[Dbix-class] Why is prefetch so slow?
jon+dbix at youramigo.com
Fri Oct 12 09:49:22 GMT 2007
On Fri, 2007-10-12 at 08:51 +0100, Will Hawes wrote:
> On 12/10/2007, Jon Schutz <jon+dbix at youramigo.com> wrote:
> In my code I have a DBIx::Class query with prefetch that is
> taking about
> 1.2 seconds to execute. If I remove the prefetch, it takes
> 0.2 seconds.
> The actual SQL query takes 0.00 seconds with or without the
> join. The
> number of records is the same with and without the
[ snip ]
> Have you verified what SQL statement is being generated by setting
> DBIC_TRACE=1 prior to running your script? It's not clear from your
> question. If not this might give more insight into the problem.
Yes, the actual SQL query takes 0.00 seconds with or without the join if
I cut and paste the trace output into the mysql client.
More information about the DBIx-Class