[sqlite] Missing optimization with id BETWEEN xxx AND xxx?

2013-05-15 Thread Dominique Pellé
Hi The SQL script at http://dominique.pelle.free.fr/query-between.sql shows 2 SELECT queries: * Select query #1 takes 20.2 sec (slow!) * Select query #2 takes 0.004 sec (fast!) Yet the 2 queries are equivalent. Here is how to download and run the script:

Re: [sqlite] the Nth 32-bit int in byte array in query

2013-05-15 Thread Stephen Chrzanowski
sort by with substr? I hadn't thought of doing that.. Thanks! On Wed, May 15, 2013 at 5:38 AM, E. Timothy Uy wrote: > Scratch that - I realized I could use substr. > > > On Tue, May 14, 2013 at 11:57 PM, E. Timothy Uy wrote: > > > I'm using

Re: [sqlite] the Nth 32-bit int in byte array in query

2013-05-15 Thread E. Timothy Uy
Scratch that - I realized I could use substr. On Tue, May 14, 2013 at 11:57 PM, E. Timothy Uy wrote: > I'm using matchinfo(...,'s') to get the length of the longest subsequence > of phrase matches from FTS4. I have 4 columns, so I end up with a byte > array that is 16 bytes

[sqlite] the Nth 32-bit int in byte array in query

2013-05-15 Thread E. Timothy Uy
I'm using matchinfo(...,'s') to get the length of the longest subsequence of phrase matches from FTS4. I have 4 columns, so I end up with a byte array that is 16 bytes long. I would like to extract the value for the Nth column in query and sort by it. I would also be interested in getting the