On Mon, Mar 15, 2010 at 12:28, Danielle Madeley < [email protected]> wrote:
> > So we're now using Sqlite to generate lists of most frequent contacts > etc. and for journalling incoming messsages, so I thought I'd profile > using it for the entire message store. > > Attached is the test, and performance graph for a variety of different > SELECTs the log backend is likely to do. > > This is a bit simplified, but should be demonstrative. Really to test it > further, we need to see how it scales to something like #ubuntu. Also, I > am not really an SQL master, so there may be improvements. > 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. Of course, I conveniently don't have SQLite nor GLib set up at the moment, so I didn't test. (Installing glib from macports and running "gcc sqlite-performance.c -I /opt/local/include/glib-2.0/ -o sqlite-performance" threw a bunch of compiler-step errors, and I'm at work, so ... :-) -- Regards, Ivan Vučica
_______________________________________________ telepathy mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/telepathy
