On Thu, Oct 7, 2010 at 2:50 PM, Shopsland gmail <shopsl...@gmail.com> wrote:
> Hi, > > Given this simple query with a subquery in FROM and a join with a FTS3 > table: > > SELECT news1.number, fts_news.title > FROM (SELECT number FROM news LIMIT 50) as news1, fts_news > WHERE news1.number=fts_news.docid > > The query runs in 15ms in 3.6.23. The same query runs in *8 seconds* in > 3.7.2. > > Jochi, looks like this is intentional behavior of inner join optimizer, there was a post recently, you can read about it here: http://www.mail-archive.com/sqlite-users@sqlite.org/msg55407.html Richard suggested using ANALIZE, other workaround is to use LEFT JOIN instead of INNER JOIN: SELECT news1.number, fts_news.title FROM (SELECT number FROM news LIMIT 50) as news1 LEFT JOIN fts_news ON news1.number=fts_news.docid in the thread mentioned you can read very details explanation about the logic introduced in v 3.7 up Max _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users