Re: [sqlite] Timing issue with min, max and count

2017-12-08 Thread x
>But these special optimizations only apply when min(), max(), and count(*) are used in isolation. Hence, they do not work for the first query above that uses all three functions at one. Thanks Richard. >(1) If you are using INTEGER PRIMARY KEY, you should *not* be using a WITHOUT ROWID. You

Re: [sqlite] Timing issue with min, max and count

2017-12-08 Thread Simon Slavin
On 8 Dec 2017, at 1:17pm, Simon Slavin wrote: > helps you (and us, if you want to post it) to understand what’s happening. Please ignore my post. Dr H explain your situation exactly. Simon. ___ sqlite-users mailing list

Re: [sqlite] Timing issue with min, max and count

2017-12-08 Thread Simon Slavin
On 8 Dec 2017, at 12:20pm, x wrote: > I have a table with 2.4 million records. It’s a without rowid table (I don’t > know if that’s significant) with an integer primary key (ID) and several > secondary indexes of the form (OtherCol, ID). If I run > > select min(ID),

Re: [sqlite] Timing issue with min, max and count

2017-12-08 Thread Richard Hipp
On 12/8/17, x wrote: > > I have a table with 2.4 million records. It’s a without rowid table (I don’t > know if that’s significant) with an integer primary key (ID) and several > secondary indexes of the form (OtherCol, ID). If I run (1) If you are using INTEGER PRIMARY