[Telepathy] thinking about a new log format for telepathy-logger

Ivan Vučica ivucica at gmail.com
Mon Mar 15 05:29:35 PDT 2010


On Mon, Mar 15, 2010 at 12:28, Danielle Madeley <
danielle.madeley at collabora.co.uk> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/telepathy/attachments/20100315/6a0da35d/attachment.html>


More information about the telepathy mailing list