Don't use *.  Explicitly select the columns you need!!  Gawd, I wish SQL
never had *.  What a bane.

Use the attribute blockfactor in your cfquery.

Is the Name column indexed?  If not, then you'll have horrendous performance
from the ORDER BY clause you have.

-----Original Message-----
From: David Clay [mailto:[EMAIL PROTECTED]]
Sent: July 25, 2001 12:56 PM
To: CF-Talk
Subject: RE: SQL Query


from the application.cfm page:

<cfquery name="Application.Company" datasource="#DS#" dbtype="ODBC">
SELECT *
FROM COMPANY
ORDER BY Name
</cfquery>


for the cfm page:

<select name="Company" tabindex="2">
<option value="">Choose a Company...
<cfoutput query="Application.Company">
   <option value="#Name#">#Name#</option>
</cfoutput>
</select>

Thanks for your help

Dave Clay
Internet Facilitator
Trus Joist, A Weyerhaeuser Business
5995 Greenwood Plaza Blvd, Suite 100
Greenwood Village, CO 80111
303.770.8506
303.770.8506

>>> [EMAIL PROTECTED] 07/25/01 03:29AM >>>
Can you post the SQL statments from your query, please?

-----Original Message-----
From: David Clay [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 24, 2001 9:50 PM
To: CF-Talk
Subject: SQL Query



I am looking for help on a way to query a table fast and efficiently.  I am
currently using a ODBC connection to SQL2000 Server with a simple CFQUERY
tag doing the query.  For a table with 18K records, it takes 14 seconds.

I know this is not doing something correct!!  Any help designing new query
statements or set up of CF or SQL2000 Servers would be helpful.

Thank you for your time.

Dave Clay
Internet Facilitator
Trus Joist, A Weyerhaeuser Business
5995 Greenwood Plaza Blvd, Suite 100
Greenwood Village, CO 80111
303.770.8506
303.770.8506
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to