Re: [sqlite] FTS pagination

2014-10-27 Thread supermariobros
Just to be clear. It basically means that after MATCH records are returned it iterates through ALL the rowids of the returned set and removes them from the set and orders them accordingly. -- View this message in context: http://sqlite.1065341.n5.nabble.com/FTS-pagination-tp78754p78849.html Se

Re: [sqlite] FTS pagination

2014-10-26 Thread Clemens Ladisch
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

Re: [sqlite] FTS pagination

2014-10-25 Thread supermariobros
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

Re: [sqlite] FTS pagination

2014-10-24 Thread Clemens Ladisch
supermariobros wrote: > 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

Re: [sqlite] FTS pagination

2014-10-24 Thread supermariobros
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 previ

Re: [sqlite] FTS pagination

2014-10-23 Thread Clemens Ladisch
supermariobros wrote: > If I am using FTQ that looks like this > SELECT * FROM mail WHERE body MATCH 'sqlite' > can I add to it "WHERE rowid > 5 AND rwoid <10" > or it will significantly slow it down. How much did it slow down when you tested it? Anyway, without index: sqlite> EXPLAIN QUERY

[sqlite] FTS pagination

2014-10-23 Thread supermariobros
Quick question. If I am using FTQ that looks like this "SELECT * FROM mail WHERE body MATCH 'sqlite' " can I add to it "WHERE rowid > 5 AND rwoid <10" or it will significantly slow it down. If so what would be the best approach for pagination, For example if I get 500 rows with the matching term a

Re: [sqlite] FTS pagination

2014-10-23 Thread supermariobros
Or maybe, if I am using android, it should be done at the cursor level? -- View this message in context: http://sqlite.1065341.n5.nabble.com/FTS-pagination-tp78754p78755.html Sent from the SQLite mailing list archive at Nabble.com. ___ sqlite-users ma