From: Rafael Kitover Date: Sat, 24 Apr 2010 00:32:58 +0000 (+0000) Subject: add "IMPROVING PERFORMANCE" section to Cookbook X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2ebf1952bcabde18f3894c474ee04bb05c90d6a5;p=dbsrgits%2FDBIx-Class-Historic.git add "IMPROVING PERFORMANCE" section to Cookbook --- diff --git a/lib/DBIx/Class/Manual/Cookbook.pod b/lib/DBIx/Class/Manual/Cookbook.pod index b4d52da..590e439 100644 --- a/lib/DBIx/Class/Manual/Cookbook.pod +++ b/lib/DBIx/Class/Manual/Cookbook.pod @@ -2084,6 +2084,47 @@ You could then create average, high and low execution times for an SQL statement and dig down to see if certain parameters cause aberrant behavior. You might want to check out L as well. +=head1 IMPROVING PERFORMANCE + +=over + +=item * + +Install L to speed up L. + +=item * + +On Perl 5.8 install L. + +=item * + +L relationships, where possible. See +L. + +=item * + +Use L in void context to insert data +when you don't need the resulting L objects, if possible, but +see the caveats. + +When inserting many rows, for best results, populate a large number of rows at a +time, but not so large that the table is locked for an unacceptably long time. + +If using L instead, use a transaction and +commit every C rows; where C gives you the best performance without +locking the table for too long. + +=item * + +When selecting many rows, if you don't need full-blown L +objects, consider using L. + +=item * + +See also L and L in this document. + +=back + =head1 STARTUP SPEED L programs can have a significant startup delay