Have you indexed the GenreDisplayName column? That should make a huge
difference in query times.

<!----------------//------
andy matthews
web developer
certified advanced coldfusion programmer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--------------//--------->

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


> I'm not a SQL expert, by any means, but wouldn't it run
> faster if you optimized your 'JOIN's a little bit? Seems like
> you're leaving it up to SQL, right now, to determine on the
> fly whether you need an INNER, OUTER, LEFT or RIGHT JOIN? You
> know your data structure, so you should be able to figure out
> which type of JOIN is necessary in each statement.
> By explicitly defining it you decrease the server overhead
> because it doesn't have to figure it out for you.

I wasn't hopefull but I tested it anyway, still takes under a second without
the DISTINCT and the exact same 1:15 with it.

--
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:255410
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