On Mon, 2010-03-15 at 13:29 +0100, Ivan Vučica wrote:

>  Interesting graph! I'm not an SQL master either, and I don't know
> about internals of SQLite, but it sounds to me like that DISTINCT in
> get-dates might be attempting to filter out every single date, but
> without help of an index. May I humbly suggest this index:
> (account, id, date)
> After filtering by account and id in WHERE statement, this should
> provide everything sorted by date, and somewhat more easily filterable
> for unique dates.

The problem is that it's a timestamp. It would be possible to split the
timestamp up into a separate date and time, so that you can index the
date. That's probably worth testing.


-- 
Danielle Madeley
Software Developer, Collabora Ltd.                  Melbourne, Australia

www.collabora.co.uk

_______________________________________________
telepathy mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/telepathy

Reply via email to