fetchall_arrayref is certainly not a good idea if you really have a large amount of data as it will put a big strain on the memory resources of your webserver.

I have an application which does a select on multiple joined tables for some combination of conditions out of about 80,000 rows and the largest pages take at most two seconds to render (including some dynamically made graphics and summary information on the data shown) through Template::Toolkit. The data is read with fetchrow_* methods.

The data is provided by the MySQL database in fractions of a second, most of the time is spent in processing the data and transmitting it to the client. Of course the database is fully indexed on all fields to be selected on.

As others have already suggested: first check where the real bottleneck is before you start optimising things which are already very fast.

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law


In reply to Re: bind_columns OR fetchall_arrayref by CountZero
in thread bind_columns OR fetchall_arrayref by tanger

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.