On Thu, May 31, 2007 at 03:37:47PM +0200, Benoit Plessis wrote:
>
> In fact i think it's the generation of the SQL query that take all the
> time or it could be the prefetching.
It's unlikely to be on the DBIC side.
Try setting DBIC_TRACE=1 and running the query against your DB yourself.
MySQL is notoriously crap at handling prefetches across many rels.
> Is it a way to prepare the resultset with all arguments except the
> search condition value, and just run the query in each loop ?
> Like the famous prepare / execute combo in DBI ?
DBIC effectively does that - for a given query it'll re-use the same
already-prepared $sth.
Don't try and micro-optimise your usage - somebody once built almost
exactly what you describe shortly before we implemented the current approach
and found it provided about a 2% speed improvement.
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director Want a managed development or deployment platform?
Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/