On 11/21/00, J.Milks penned:
>BLOCKFACTOR
>Optional. Specifies the maximum number of rows to fetch at a time from the
>server. The range is 1 (default) to 100. This parameter applies to ORACLE
>native database drivers and to ODBC drivers. Certain ODBC drivers may
>dynamically reduce the block factor at runtime.

This is from the April 2000 edition of CFDJ. Article; In Defense of 
MS Access, By Bruce Van Horn:

First, add the Blockfactor="100" attribute to all your CFQUERY tags. 
This alone will dramatically increase the speed of your queries. 
Without this attributes, when you run a query, ODBC hands the 
retrieved records back to the CF server one at a time. By adding this 
attribute, ODBC will keep the records and then hand them off to CF in 
blocks of 100 at a time, which is much faster.

He goes onto to give a benchmark result that shows the time for a 
query with blockfactor="100" running at 97.19 ms as opposed to 420 ms 
without.

>My understanding of this is that it determines the number of rows to fetch,
>regardless of size. Am I wrong?

All rows matching your search terms will be fetched during any query. 
Blockfactor tell how many to hand from ODBC to ColdFusion at a time. 
So with blockfactor="100", a query returning 800 records will result 
in CF and ODBC "talking" to each other 8 times, as opposed to 800 
times.

>Also, are you able to answer my other question about if or not the MAXROWS
>would take precedence and if a stored procedure was used, what effect
>BLOCKFACTOR and MAXROWS have if the SP itself was limiting rows.

I would think blockfactor would have the same results with SP. 
Maxrows is purely on the CF side of things. All rows from the query 
are returned with or without SP, but only the number you set as 
maxrows are output.
-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to