Have you tried defining an index on GenreDisplayName?

--- Ben


-----Original Message-----
From: James Smith [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 04, 2006 7:08 AM
To: CF-Talk
Subject: RE: Another MSSQL issue, why is DISTINCT so slow?

What makes this silly is that if I run the query without the DISTINCT it
takes a fraction of a second to return a couple of thousand rows.  I can
then do a...

<cfquery name="getGenres" dbtype="query"> SELECT DISTINCT
GenreDisplayName,GenreDisplayID FROM getGenres </cfquery>

In CF and that takes about a second, so why is it taking 1:15 for MSSQL do
do it in one operation?

--
Jay




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255368
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to