From: Alan Chen Date: 2002-05-25T01:37:38+09:00 Subject: Re: dbi pg_dbd performance On Fri, May 24, 2002 at 07:23:51AM +0900, Sean Chittenden wrote: > > Has anybody else found that the ruby dbi + pg_dbd performance to be slow? > > > > I'm running a unit test that selects all the records in a single > > PostgreSQL table. I'm finding that the select of about 300 records > > takes about 0.2sec using the direct ruby postgres binding while the > > DBI takes anywhere from 2.8-6 seconds. > > What version of DBI are you using? Can you upgrade? There have been > major speed improvements in DBD::Pg recently that have significantly > reduced the time it takes to perform operations that return a row > (factor of a thousand or so). -sc I thought I did, rechecked it and found out that I had installed DBI 0.15 to the wrong location. (I wish the dbi package would default to the /usr/local tree). The unit test and query code has been changed somewhat, so now I'm getting ~0.06 sec - postgres binding ~0.14 sec - DBI binding Which is still a little more than a factor two difference, but into the range where I can justify trading off DBI for postgres. - alan -- Alan Chen Digikata LLC http://digikata.com