Not the same thing at all.
TOP 10 tells the database to only give you the first 10.
BLOCKFACTOR=10 tells the database driver to give you all of the results of the query, 
but transfer them internally 10 at a time.
It does not affect the results of the query. Just the speed and efficiency of the 
transfer of the data.

At 02:50 PM 11/21/00 -0600, Mark W. Breneman wrote:
>Is BLOCKFACTOR=10 the same as a SQL Select top 10 *?
>
>Note: Top X only works in MS SQL for sure.
>
>Is BLOCKFACTOR faster?
>
>Thanks
>Mark W. Breneman
>-Cold Fusion Developer
>-Network Administrator
>  Vivid Media
>  [EMAIL PROTECTED]
>  www.vividmedia.com
>  608.270.9770
>
>-----Original Message-----
>From: Dave Watts [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, November 21, 2000 2:13 PM
>To: CF-Talk
>Cc: [EMAIL PROTECTED]
>Subject: RE: Dave Watts please read - Re: BLOCKFACTOR and MAXROWS
>
>
>> I started this thread, and its evolution has lead me to
>> believe that in fact I may not understand the implementation
>> of the BLOCKFACTOR attribute. The following is from the 4.5
>> Studio help:
>>
>> 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.
>>
>> My understanding of this is that it determines the number of
>> rows to fetch, regardless of size. Am I wrong? 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.
>
>The BLOCKFACTOR and MAXROWS attributes are completely unrelated. Neither
>will affect the other.
>
>BLOCKFACTOR is used to control how many rows are transferred from the
>database to the database client at one time. Let's say you execute a query,
>and it returns one hundred rows. By default, the value for BLOCKFACTOR is 1,
>and the database (DB) will have a conversation with the database client (CL)
>like this:
>
>CL: Here's my SQL query. Get to work!
>...
>DB: I've got your recordset right here.
>CL. OK. Give me the first record.
>DB. Here it is. Got it?
>CL. Yes. Give me the second record.
>... and so on up to the hundredth record, at which point CF will be able to
>use the recordset in a CFOUTPUT or whatever.
>
>Increasing the BLOCKFACTOR will allow the database to return more than one
>record at a time to the client, which generally improves performance. The
>total number of records that can be transferred at once is limited by the
>available buffer size, which is 32Kb. So, to figure the appropriate
>BLOCKFACTOR, you find the maximum length of a single row from your
>recordset, then divide that into 32Kb. The use of BLOCKFACTOR doesn't affect
>how many records are returned from the database, it only affects how they'll
>be passed from the database to CF.
>
>MAXROWS, on the other hand, determines how many records CF will accept from
>the database; if you only want to show ten records, you'd set MAXROWS to 10.
>
>Dave Watts, CTO, Fig Leaf Software
>http://www.figleaf.com/
>voice: (202) 797-5496
>fax: (202) 797-5444
>
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>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
>
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>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 


---------------------------------------------------------------------------
Peter Theobald, Chief Technology Officer
LiquidStreaming http://www.liquidstreaming.com
[EMAIL PROTECTED]
Phone 1.212.545.1232 x204 Fax 1.212.545.0938

To put this contact information into your Palm device, click here:
http://www.coola.com/cgi-bin/addinfo.cgi?pid=15803&rid=972879910&type=A


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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