RE: maxrows and blockfactor
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Both MAXROWS and BLOCKFACTOR are optional attributes for CFQUERY. MAXROWS allows you to define the maximum rows retrieved each query (eg: 10). If you leave out MAXROWS the query will return all records in the database matching your query. This could be thousands so maxrows can be handy. BLOCKFACTOR 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. As I understand it blockfactor can be used to boost the performance of a query (the database server does the work) but I'm not sure how. - -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of sebastian palmigiani Sent: Sunday, 8 July 2001 7:28 AM To: CF-Talk Subject: maxrows and blockfactor What is the difference between maxrows and blockfactor? Both are available with cfquery but only blockfactor is available with cfstoredproc. Can you use blockfactor with a cfstoredproc the same way that you would use maxrows in cfquery? Sebastian Palmigiani - Cash Flow Club Charity http://www.cashflowclubonline.com/?SEB007883 voice: 773.929.9256 ~~ 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
RE: maxrows and blockfactor
MAXROWS allows you to define the maximum rows retrieved each query (eg: 10). If you leave out MAXROWS the query will return all records in the database matching your query. This could be thousands so maxrows can be handy. By the way, did you know if you pass -1 to MAXROWS, it will return everything? Why would you do that? Imagine a situation where MAXROWS was a variable, like so: CFSET MAX = 100 CFQUERY MAXROWS=#MAX# ... /CFQUERY What if you needed a way to go from a max of 100 to no max? Normally you would use a CFIF and two CFQUERY blocks since CF tags that allow you to dynamically pass attributes (unlike custom tags which can use ATTRIBUTECOLLECTION), but by using MAX=-1 you could then support this type of switch. Hope that makes sense. === Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email : [EMAIL PROTECTED] ICQ UIN : 3679482 My ally is the Force, and a powerful ally it is. - Yoda ~~ 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
Re: maxrows and blockfactor
maxrows is the maximum rows the query will return. blockfactor is how many rows are returned per database call. a query returning 100 rows with a blockfactor=1 (default) will make 100 database calls. with blockfactor=100 (the maximum) it will make one database call. Chris Norloff -- Original Message -- From: sebastian palmigiani [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Sat, 07 Jul 2001 16:28:06 -0500 What is the difference between maxrows and blockfactor? Both are available with cfquery but only blockfactor is available with cfstoredproc. Can you use blockfactor with a cfstoredproc the same way that you would use maxrows in cfquery? Sebastian Palmigiani Cash Flow Club Charity http://www.cashflowclubonline.com/?SEB007883 voice: 773.929.9256 ~~ 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
RE: maxrows and blockfactor
Thanks for the tip; I didn't know this. Apparently, neither do the folks who write the CF documentation. You might want to share it with them. Well, it is missing from the CF4.x docs, but it does exist in the CF5 doc. === Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email : [EMAIL PROTECTED] ICQ UIN : 3679482 My ally is the Force, and a powerful ally it is. - Yoda ~~ 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
RE: maxrows and blockfactor
Thanks for the tip; I didn't know this. Apparently, neither do the folks who write the CF documentation. You might want to share it with them. Well, it is missing from the CF4.x docs, but it does exist in the CF5 doc. Right you are! It's nice to see the inexorable march of progress. 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
RE: maxrows and blockfactor
What is the difference between maxrows and blockfactor? Both are available with cfquery but only blockfactor is available with cfstoredproc. MAXROWS specifies the maximum number of rows. BLOCKFACTOR specifies the number of rows that CF will attempt to store in the database driver's storage buffer upon each row fetch. The two don't have anything to do with each other. The buffer is 32 Kb, so you can figure out how many rows (assuming the maximum possible row length) can fit into the buffer, then specify that number as the BLOCKFACTOR attribute value. This is a performance enhancement; it makes getting the data faster. It doesn't affect how many rows will be returned by your query. Can you use blockfactor with a cfstoredproc the same way that you would use maxrows in cfquery? No, but you can use MAXROWS with CFPROCRESULT, which will have the same effect as using it with CFQUERY. 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
RE: maxrows and blockfactor
BLOCKFACTOR is how many rows are returned along the pipe at one time from the query. for example, if you have BLOCKFACTOR set to 50, and the query would return 400 rows, the DB sends the rows along the network pipe in blocks of 50. chris olive, cio cresco technologies [EMAIL PROTECTED] http://www.crescotech.com -Original Message- From: sebastian palmigiani [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 07, 2001 5:28 PM To: CF-Talk Subject: maxrows and blockfactor What is the difference between maxrows and blockfactor? Both are available with cfquery but only blockfactor is available with cfstoredproc. Can you use blockfactor with a cfstoredproc the same way that you would use maxrows in cfquery? Sebastian Palmigiani Cash Flow Club Charity http://www.cashflowclubonline.com/?SEB007883 voice: 773.929.9256 ~~ 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