Note: Please check the original question placed in Q+A, with the title How to display from X to Y records using DBI?. I am moving the topic to Seekers of Perl Wisdom because I still have a few doubts (although the question was answered very well) and Q+A doesn't really provide a threaded discussion format.

OK, now that we got that out of the way... Thanks as usual guys (chromatic and btrott)! You're saviors! :o)

Back to chromatic's reply, I was wondering if the method
# we want 0 through 20 foreach my $row (@$array_ref[0 .. 20]) { # do something }
might be an overkill... I'll explain:
What if my execute() returns more than 50,000 rows. What would DBI do with them if I used the above mentioned? Would I still be populating the @$array_ref[] with 50,000 keys? Would there still be 50,000 rows of traffic between DBD and MySQL?

cheers!

In reply to More on selecting rows with DBI... by BBQ

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.