On 23 Nov 2018, at 3:44pm, Wout Mertens <[email protected]> wrote:

> CREATE TABLE log(type TEXT, amount INTEGER)
> SELECT type, SUM(amount), COUNT(*) FROM log GROUP BY type
> 
> What would be good approaches to make the query fast?

Create an index for "log(type, amount)".

Simon.
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to