lock
add db indexes