Note that the DBI
RowCacheSize database handle attribute can often help
you balance your memory/speed tradeoff for large queries. But
it depends on the underlying database -- not all can make use
of it. In practice, I have found some significant differences
in query time/memory when changing this for queries that
return large numbers of rows.
For significant database applications I find it nearly
impossible to write SQL that works across all. I always
end up having to make use of database-specific functions or
other constructs. If your application is only going to run
on one database it's probably fine to make use of
LIMIT, TOP, or Oracle's ROWNUM. It
depends on whether your priority is speed and function or
portability across databases.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|