[Dbix-class] Why is prefetch so slow?

Jon Schutz jon+dbix at youramigo.com
Fri Oct 12 13:45:55 GMT 2007


On Fri, 2007-10-12 at 13:08 +0100, Ash Berlin wrote:
> Hartmaier Alexander wrote:
> > Zero time sql!
> > Sounds like a Whoracle feature for version 12!
> > Or the next big thing for Damian Conway after his this year's YAPC::EU talk...
> > 
> > -Alex
> > 
> 
> Zero time was last years (or further back.) This year was negative time.
> Or does that make it last year's was negative time. Or maybe the year
> before that......
> 
> On a more serious note, Jon: 0.00 implies that MySQL (client) has cached
> that query.

No no, in this case it means the query took less than 0.005 seconds as
the MySQL client rounds to 2 decimal places.  Have a read of the timings
in the original post:

DBI operation with prefetch took 0.000979 secs
DBI operation without prefetch took 0.000793 secs
Repeat DBI operation with prefetch took 0.000762 secs

Inspect the code if you like; it was attached to the earlier post.

-- 

Jon



More information about the DBIx-Class mailing list