Simon Kröçer wrote: > Reid Thompson: > > >>> Runs in 12-13 seconds -- entirely possible that the other box( p4, >>> 2+ghz, 1GB ram, native ruby ) could drop it down under 10 seconds( or >>> even this box, if I took cygwin out of the equation ). >>> >>> db =Og.setup(og_psql) >>> t1= Time.now >>> db.store.start >>> >>> 1.upto(10000) { |i| >>> c = Comment.new >>> c.title = 'Hello' >>> c.body = 'World' >>> c.create_time = Time.now >>> c.author = 'tml' >>> c.save >>> } >>> >>> db.store.commit >>> puts Time.now - t1 >>> >>> >>> >>> >> Upated athlon system to PostgreSQL 8.1.3 >> 8.78-9.2 seconds... >> > > As Ara said: "it's madness not to use sqlite" if you don't need the > networking capabilities of MySQL or whatever. > > change DB to sqlite3: > > ----------------------------------------------------------- > require 'sqlite3' > > File.delete("test.db") if File.exists?("test.db") > db = SQLite3::Database.new("test.db") > t1= Time.now > > db.execute("CREATE TABLE comments (title, body, create_time, author)") > > db.transaction do > 1.upto(10000) do > db.execute("insert into comments values ('Hello', 'World', ?, 'tml' > )", Time.now) > end > end > > puts Time.now - t1 > ------------------------------------------------------------ > 1.5 seconds > > (Pentium M, 2.13GHz, 1GB RAM) > > cheers > > Simon > > > > agreed, if sqlite meets your needs, it would be the tool to use. IMO it is an exceptional piece of software for what it is designed to do.