[thelist] CF - MAXROWS

Daniel J. Cody dcody at oracular.com
Tue Jul 18 18:47:52 CDT 2000

Hey Palyne - 

Good question. I think the problem is that you're confusing what the
'blockfactor' attribute does.. 'Blockfactor' tells CF how many rows to
fetch at a time from your DB server. By default, its set to 1(unless
your ODBC driver has a special setting for this(it will only work with
ODBC or Oracle Native drivers too)), which means that if you have a
resultset that returns 34 rows and don't have a blockfactor defined, CF
will make a trip back to the DB for each row in the resultset.

If you have a blockfactor of 50 set, but your query only returns 25
rows, blockfactor will fetch the highest possible amount of rows it can,
in this case, it will make 1 trip to the DB and return 25 rows. If you
had a query that returned 51 rows and a blockfactor of 50, it would make
2 trips to the DB, one trip would get 50 rows, the next would get 1.

Maxrows on the other hand specifies the number of rows you want returned
in the recordset, just as you said.

So, if you have a blockfactor of 5 and a maxrows of 100 you're query
*WILL* return 100 rows. It will just fetch them from the DB server in 20
trips of 5 rows a piece, and then assemble them on the other end.

Hopefully that makes sense, shout if not :)


Palyne Gaenir wrote:
> Dear Evoltians,
> Another CF question:
> 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?

More information about the thelist mailing list