remove shared memory lock from select query, do it only if receive a SQLITE_BUSY
remove old entries after sync memory with database
remove unnecessary 'order by', which make select be slower