Blockfactor determines how many rows of data are returned at a time, now how
many are returned in total.

The default value is one, so SQL server will returns rows 1 at a time.
The max value is 100, so if you have a lot of data to be returned then you
should set this to a higher value so that less trips to the database are
required.

Limiting how much data is returne dby the query can be done by using For
example

Select top 100 * form table

Limiting the output can also be done via the cfoutput tag

<cfoutput query="myquery" maxrows="10">

--
Snake



 

-----Original Message-----
From: jjbgotty jjbgotty [mailto:[EMAIL PROTECTED] 
Sent: 05 July 2006 21:23
To: CF-Talk
Subject: CF crashing SQL 170K

Hi all, I have a database with 170K records. What I'm doing is using CF to
query this data with a blockfactor attribute.
   
  <cfquery name="qry_selectContacts" datasource="#getVars().dsn#"
blockfactor="#arguments.maxRows#">
   
  I have my loop doing. 
   
  <cfloop query="qry_getRecords" startrow="#url.startRow#" endrow="#iif(not
isDefined('form.goToPage') and url.startRow eq 1 or
(isDefined('form.goToPage') and form.goToPage eq 1),
de('#variables.maxRows#'), de('#(url.startRow+(variables.maxRows-1))#'))#">
   
  Now my query is in an application cached component.
   
  SQL in this case is on the same machine.
   
  What seems to be happening when it doesn't crash is that the connection
from CF to the database (Driver?) is getting clogged up. CF returns the list
immediatelly as soon as the data is retrieved.
   
  Does anyone have any ideas on how I can speed up the process? I have a
feeling I need to do something in SQL but I don't know what to do. How come
with the blockfactor it still seems to be trying to retrieve all the data?

                
---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates
starting at 1ยข/min.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:245469
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to