On 24 Oct 2019, at 7:38pm, Jens Alfke <j...@mooseyard.com> wrote:

> I've created an index on `name, timestamp desc`.

Make another one missing out the DESC.  Just in case it helps.  You'll probably 
just delete it after a little testing.

I don't see anything obviously wrong with what you wrote.

> One simplifying assumption: I basically never drop any rows, and if I do 
> they're old rows, so max(timestamp) for any author will only increase.

Well, timestamps can only increase.  So if you never delete the row containing 
the latest update for each name …

Depending how often you run the query you posted about, had you considered 
creating another table which just contains name and latest timestamp and value 
?  You could update that table inside your code, or use a TRIGGER on INSERT 
into the other table.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to