On 7 Apr 2015, at 9:42pm, Paul Caskey <paul.caskey at gmail.com> wrote:

> Any idea why there is such a performance hit when I ask for both min() and
> max() at the same time? Shouldn't it be just as fast as querying them
> individually?

Did you try using EXPLAIN QUERY PLAN ?

If the column you're minning (or maxing) is indexed, SQLite can find the row it 
needs just by checking one end of one index.  It can go straight there.

If you're asking for both min() and max() I'm not sure what it does.  It might 
be try to find both ends of the index.  Or maybe it has to do two complete 
searches.

Simon.

Reply via email to