Re: [sqlite] [EXTERNAL] Re: How to use ORDER BY on FTS5 table ?

2019-04-10 Thread Nik Jain
>If the original table has an index starting with price: >WITH idlist(id) AS (SELECT id FROM fts WHERE col1 MATCH '50') SELECT * FROM table CROSS JOIN idlist ON (idlist.id=table.id) ORDER BY price; >or >WITH idlist(id) AS (SELECT id FROM fts WHERE col1 MATCH '50') SELECT * FROM table WHERE id IN

Re: [sqlite] How to use ORDER BY on FTS5 table ?

2019-04-10 Thread Nik Jain
guessing that this is a common scenario, that has a regular way of being done. If so could anyone point me to anything? Thanks On Wed, Apr 10, 2019 at 11:39 AM Clemens Ladisch wrote: > PM Nik Jain wrote: > > A SCAN is being performed on a fts5 table. I am not sure but I > > think that means

Re: [sqlite] How to use ORDER BY on FTS5 table ?

2019-04-09 Thread Nik Jain
Anybody ? On Mon, Apr 8, 2019 at 9:03 PM Nik Jain wrote: > ok. I investigated further, and it seems my problem is something else > entirely! A SCAN is being performed on a fts5 table. I am not sure but I > think that means no index. > > Query plan: > sqlite> explain quer

Re: [sqlite] How to use ORDER BY on FTS5 table ?

2019-04-08 Thread Nik Jain
.your query here" to see if indexes > are being used. > > Wout. > > On Sun., Apr. 7, 2019, 9:41 a.m. Nik Jain wrote: > > > Have a fts5 table with 2 indexed columns. Where the idea is to match by > > one col and sort using the other one. Something like : >

[sqlite] How to use ORDER BY on FTS5 table ?

2019-04-07 Thread Nik Jain
Have a fts5 table with 2 indexed columns. Where the idea is to match by one col and sort using the other one. Something like : "select id from fts where col1 match '50' order by price " This is slow. 0.07 seconds. Removing the order by clause - 0.001 seconds. How do I fix this ? I have a

[sqlite] How to use ORDER BY on FTS5 table ?

2019-04-05 Thread Nik Jain
Have a fts5 table with 2 indexed columns. Where the idea is to match by one col and sort using the other one. Something like : "select id from fts where col1 match '50' order by price " This is slow. 0.07 seconds. Removing the order by clause - 0.001 seconds. How do I fix this ? I have a