[thelist] CF - MAXROWS

Jeff jeff at members.evolt.org
Sat Jul 22 14:30:38 CDT 2000


palyne,

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: Palyne Gaenir <palyne at sciencehorizon.com>
:
: If BLOCKFACTOR chooses how many rows a query will
: get -- and we assume that it can't get more than are
: available, of course -- and MAXROWS chooses the max
: rows a query will get, then what, practically, is the difference?
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

by default when the cold fusion server is communicating with the database
server it gets each record back one row at a time.  what the blockfactor
attribute does is increase the number of rows that are returned at a time
from 1 up to the maximum of 100.  if your query returned 300 records then it
would get 3 blocks of results from the database server each 100 records
heavy instead of 300 individual blocks of 1 record results.

the maxrows attribute actually limits the number of rows returned.  however,
it doesn't do this limit at the database level.  it does it after it's
retrieved all the available records for that query.  so, if you want to
limit the number of records displayed at a time, i would recommend using the
startrow and maxrows attributes of the cfoutput tag instead, to create pages
of results.

<tip type="cold fusion" author=".jeff">

wanna make your applications as fast as they can be?  then you need to read
up on some of allaire's suggested performance tips.

http://www.allaire.com/Handlers/index.cfm?ID=13810&Method=Full

</tip>

good luck,

.jeff

name://jeff.howden
game://web.development
http://www.evolt.org/
mailto:jeff at members.evolt.org





More information about the thelist mailing list