supermariobros wrote: > Well, they all give exactly the same output. > > sqlite> EXPLAIN QUERY PLAN SELECT rowid FROM activity_text_content WHERE > activity_text_content MATCH 'x' ORDER BY rowid ASC LIMIT 100; > 0|0|0|SCAN TABLE activity_text_content VIRTUAL TABLE INDEX 4:ASC (~0 rows) > > sqlite> EXPLAIN QUERY PLAN SELECT rowid FROM activity_text_content WHERE > activity_text_content MATCH 'x' AND rowid>1000 ORDER BY rowid ASC LIMIT 10; > 0|0|0|SCAN TABLE activity_text_content VIRTUAL TABLE INDEX 4:ASC (~0 rows) > > sqlite> EXPLAIN QUERY PLAN SELECT rowid FROM activity_text_content WHERE > activity_text_content MATCH 'x' LIMIT 100; > 0|0|0|SCAN TABLE activity_text_content VIRTUAL TABLE INDEX 4: (~0 rows) > > It almost looks like EXPLAIN ignores the second part where rowid is compared > or sorted.
It doesn't change the way in which the database accesses the table, which implies that the rowid comparison is not using any index, i.e., the FTS module first computes the results, and then the rows with small rowid values are thrown away. Regards, Clemens _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

