On 31 May 2013, at 8:21am, Paul Vercellotti <pverce...@yahoo.com> wrote:
> If I change it to the following, by removing the first OR: > SELECT files.key FROM files, search_hierarchy, filename_fts, > file_comment_metadata > WHERE search_hierarchy.child = files.parent AND filename_fts.rowid = > files.key AND file_comment_metadata.rowid = files.key AND > ( search_hierarchy.parent = 12 ) AND > > ( (filename_fts.file_name_fts MATCH '"X*"') OR > (file_comment_metadata.fileComment MATCH '"X*"') ) LIMIT 0, 1000; > > > It runs very fast (75ms) As a temporary fix, perform both of these very fast queries, then use UNION to combine the answers. PS: Also, as Clemens wrote, you should perform ANALYZE on your database once it has reasonable data in it. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users