Running the Active Record unit tests on an old Powerbook G4 867, I get some odd performance (in seconds to complete all tests): 51.9 SQLite2 with 2.2.3 C bindings 57.3 MySQL 4.1.7 with 2.5.1 C bindings 65.0 MySQL 4.1.7 with included Ruby bindings 78.5 PostgreSQL 8.0.1 with 0.7.1 C bindings 256.3 SQLite3 with 1.1.0 C bindings Has anyone noticed/investigated the SQLite3 slowdown? I made certain that I''m using the Native driver (the DL driver doesn''t work on big-endian platforms anyway.) jeremy
On Sat, 26 Feb 2005, Jeremy Kemper wrote:> Running the Active Record unit tests on an old Powerbook G4 867, I get > some odd performance (in seconds to complete all tests): > > 51.9 SQLite2 with 2.2.3 C bindings > 57.3 MySQL 4.1.7 with 2.5.1 C bindings > 65.0 MySQL 4.1.7 with included Ruby bindings > 78.5 PostgreSQL 8.0.1 with 0.7.1 C bindings > 256.3 SQLite3 with 1.1.0 C bindings > > Has anyone noticed/investigated the SQLite3 slowdown? > > I made certain that I''m using the Native driver (the DL driver doesn''t > work on big-endian platforms anyway.) > > jeremyi don''t know anything specific about that - but sqlite3 is know to be slower than previous versions... if the tests stress the slower bits... might want to check out the sqlite mailing list - i''ve read a lot of similar claims and know there are fixes in some cases. cheers. -a -- ==============================================================================| EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov | PHONE :: 303.497.6469 | When you do something, you should burn yourself completely, like a good | bonfire, leaving no trace of yourself. --Shunryu Suzuki ===============================================================================
Ara.T.Howard wrote:> On Sat, 26 Feb 2005, Jeremy Kemper wrote: >> Running the Active Record unit tests on an old Powerbook G4 867, I get >> some odd performance (in seconds to complete all tests): >> >> 51.9 SQLite2 with 2.2.3 C bindings >> 57.3 MySQL 4.1.7 with 2.5.1 C bindings >> 65.0 MySQL 4.1.7 with included Ruby bindings >> 78.5 PostgreSQL 8.0.1 with 0.7.1 C bindings >> 256.3 SQLite3 with 1.1.0 C bindings191.9 SQLite3 with 1.1.0 C bindings, synchronous writes disabled> might want to check out the sqlite mailing list - i''ve read a lot of > similar > claims and know there are fixes in some cases.Thanks for the tip. MacOS X uses the F_FULLFSYNC fcntl to explicitly flush the disks'' write buffers. This is safer than a normal fsync but is very slow. http://www.mail-archive.com/sqlite-users%40sqlite.org/msg06502.html Disabling synchronous writes is a horrible idea for a production app, but it seems fine for unit tests: ActiveRecord::Base.connection.execute ''PRAGMA SYNCHRONOUS = OFF'' It doesn''t help much; SQLite3 remains ~4x slower than SQLite2. Can anyone corroborate these results on another platform? jeremy
> It doesn''t help much; SQLite3 remains ~4x slower than SQLite2. Can > anyone corroborate these results on another platform?Nope. There''s a SQLite3 slowness, but not a ~4x slowness. FBSD 5.3, P2-400 ~66 SQLite 2.8.15 with 2.2.3 C bindings ~69 MySQL 4.1.10 with 2.5.1 C bindings ~70 MySQL 4.1.10 with included Ruby bindings ~107 PostgreSQL 8.0.1 with 0.7.1 C bindings ~71 SQLite 3.0.8 with 1.1.0 C bindings