I use DBI with PostgreSQL for some years. I think, that your question is too general. My experience is shrinkable to following points:
1/ Imagine your final sql queries. And resolve, what should be in perl and what in db (as view, for instance). Observe db-related performance optimization dependencies.
2/ Think about dynamic and static part of queries
3/ Develop own helper functions for building queries on the fly - parameters binding is strongly recommended.
4/ Think about how many rows is the real maximum of query.
5/ If the result of query is too long, think about user interface - how to list.
6/ Play with sql parts limiting result rows (offset and limit in PostgreSQL) and with pulling datas from db (1 row, n rows, all rows) into perl and, potentially, with attributes of $sth - but be aware, some of them are db dependent. Typically, I use offset, but not limit in sql-string. But I do not pull all rows from db, only actually needed, and something as $sth->{ROWS} says me count of all rows.
Thats all, I am sorry for that so general answer and my english, too :)

In reply to Re: Class::DBI and Query with JOIN'S + Paging support by pajout
in thread Class::DBI and Query with JOIN'S + Paging support by Anonymous Monk

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.