Hi Thanks For quick response Of course you are right that I can not use row id in the way I used it above. I guess I wrote it quicker than I thought about it. However If I use original rowid and LIMIT it should be fine, knowing that the submited rowid is the rowid of the last element of the previous set. Like this: SELECT rowid FROM text_content WHERE text_content MATCH 'x' AND rowid >1000 ORDER BY rowid LIMIT 10; of course it only works when last rowid of the previous set is available so I can not just skip to the N-th page, wchich is fine in my case. I just have to know first and last element to go back and forward;
This is what explain query shows: 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: (~0 rows) If I understand it correctly it uses indexes properly on FTS but I do not know how the row id scanning and sorting is done. If you have some time could you shed some light on this. Also when I compare time of the querry of the one with rowid > to the one with OFFSET query on 5000 records I do not see any difference in execution time. I read just like you wrote that OFFSET starts to be time consuming when number is very high but what is the high number case. I doubt I will ever deal with more than 10000 records in this entire virtual table so should I even be concerned? Thanks -- View this message in context: http://sqlite.1065341.n5.nabble.com/FTS-pagination-tp78754p78772.html Sent from the SQLite mailing list archive at Nabble.com. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users