sqlite3 timing
From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Thu, 14 Jul 2011 05:53:52 +0300
From my shell session:
[[[
% time sqlite3 foo.db "SELECT hash, revision, offset, size, expanded_size FROM rep_cache;" > /dev/null
% time sqlite3 foo.db "SELECT hash, revision, offset, size, expanded_size, COUNT(*) FROM rep_cache;" > /dev/null
% time sqlite3 foo.db "SELECT hash, revision, offset, size, expanded_size, COUNT(*) FROM rep_cache;" > /dev/null
% time sqlite3 foo.db "SELECT hash, revision, offset, size, expanded_size FROM rep_cache;" > /dev/null
% sqlite3 -version
That is: adding COUNT(*) to the query makes it 3.9 times faster.
Huh? How does that make sense? Should we do anything differently in
[ This isn't a fabricated example --- this is the query I added to
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.