[sqlite] Different timings on min() and max()

2015-04-07 Thread Simon Slavin
On 7 Apr 2015, at 9:42pm, Paul Caskey 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 i

[sqlite] Different timings on min() and max()

2015-04-07 Thread Paul Caskey
Hello, 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? Nothing else is reading or writing to this data at this time. [14:32 sql04:/opt/pcaskey]$ cat ~/.sqliterc .output /dev/null PRAGMA

[sqlite] Different timings on min() and max()

2015-04-07 Thread Scott Hess
On Tue, Apr 7, 2015 at 1:42 PM, Paul Caskey 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? This has come up before. Either alone can be satisfied from an index lookup, whi