Re: [sqlite] Request: Combining skip-scan with 'max' optimization

2019-11-21 Thread Andy Bennett
Hi, I hadn't seen this thread when I posted my recent thread on optimising MAX aggregates but I suspect this could help my case as well. At the moment I'm trying to limit the amount of data that the aggregate query has to visit in order to keep latency low but this optimisation would give

[sqlite] Request: Combining skip-scan with 'max' optimization

2019-11-21 Thread Jens Alfke
I'm following up on my "Optimizing `SELECT a, max(b) GROUP BY a`" thread from a few weeks ago, rephrasing it as a clearer enhancement request. ACTUAL BEHAVIOR: A query of the form `SELECT a, max(b) GROUP BY a` runs slowly (O(n) with the number of table rows), even if there is an index on (a, b