I have big app that uses Class::DBI heavily. I'd like to speed it up. Before profiling, my assumption was the DB was the limiting factor. Below are some profiling results. All the big time eaters are CDBI (which means, I think, the DB itself.)

How should I intrepret these results?

For example, does this tell me that the perl stuff isn't taking any time (assuming the algorithm isn't dumb) and that to gain speedup I should pay attention to the database side, indexes and summary tables and so forth?

I wouldn't gain any speed dropping CDBI and using DBI, would I?

Is there any point optimizing the perl, when all the time seems CDBI (eg DB)?

Should I care it seems to be spending alot of time lowercasing column names   Class::DBI::Column::name_lc?

Thanks for any advice.

water

%Time Sec. #calls sec/call F name 14.67 55.4872 2174052 0.000026 <anon>:...5.8.2/Class/DBI/Colu +mn.pm:37 9.55 36.1474 2178574 0.000017 Class::DBI::Column::name_lc 7.01 26.5282 2627968 0.000010 Class::Accessor::get 6.52 24.6642 220518 0.000112 ? <anon>:..._perl/5.8.2/Class/DB +I.pm:723 5.20 19.6819 264665 0.000074 ? Class::DBI::_init 4.97 18.7836 884369 0.000021 <anon>:...perl/5.8.2/Class/DBI +.pm:1039 4.51 17.0602 661572 0.000026 ? <anon>:...rl/5.8.2/Class/Trigg +er.pm:51 4.41 16.6713 583607 0.000029 Class::DBI::primary_column 3.62 13.6949 661572 0.000021 <anon>:.../DBI/Relationship/Ha +sA.pm:38 3.01 11.3699 583837 0.000019 Class::DBI::ColumnGrouper::pri +mary 2.82 10.6654 266945 0.000040 Class::DBI::_attribute_store 2.59 9.8148 220528 0.000045 Class::DBI::meta_info 2.55 9.6606 220524 0.000044 ? Class::DBI::_simple_bless 2.19 8.2928 361192 0.000023 Class::DBI::_attrs 1.92 7.2692 630109 0.000012 Class::DBI::ColumnGrouper::gro +up_cols 1.39 5.2500 220524 0.000024 <anon>:.../DBI/Relationship/Ha +sA.pm:46 1.36 5.1261 220524 0.000023 <anon>:.../DBI/Relationship/Ha +sA.pm:37 1.35 5.1138 220523 0.000023 <anon>:.../DBI/Relationship/Ha +sA.pm:70 1.25 4.7459 21 0.225996 DBI::st::execute 1.13 4.2896 88172 0.000049 Class::DBI::get 1.08 4.1012 264665 0.000015 <anon>:..._perl/5.8.2/Class/DB +I.pm:518 1.00 3.7662 176564 0.000021 <anon>:..._perl/5.8.2/Class/DB +I.pm:722

In reply to Using Devel::Profile output to know what to do next by water

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.