I'm no db expert, but AFAIK for complex db queries it would be better (performance wise) to store the prepared query and then in following executions just update bound value and execute again. Some details here: http://stackoverflow.com/questions/1703203/in-sqlite-do-prepared-statements-really-improve-performance

This might be good candidate to try if it makes any difference.