[Yum-devel] Sqlite performance

Florian Festi ffesti at redhat.com
Wed Mar 21 14:39:35 UTC 2007


Hi!

I had the feeling that the yum sqlite db is slow - too slow.

I wrote a small python program that shows the problem: Joining with packages 
to map the pkgId to the pkgKey is expensive.

The values strongly differ depending on the presence of indices (surprise!).
So my program runs the test twice and tries to create/drop the index. Write 
access is needed for altering the index.

Output on my computer (FC6 core) is:

Reading requires.name for pkg 'glibc'
Access via pkgId:   7.07 0.0707
Access via pkgKey:  1.39 0.0139
Access via pkgKey is 5.1 times faster
creating index took 0.38s
Access via pkgId:   2.21 0.0221
Access via pkgKey:  0.01 0.0001
Access via pkgKey is 212.7 times faster

The first number is the overall time and the second the time per select.

have fun

	Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yumsqlite.py
Type: text/x-python
Size: 1554 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20070321/02769c81/attachment.py 


More information about the Yum-devel mailing list