David
use a query hint, be wary of using query hints though would only use in
circumstances where you know it is the best option, optimiser will normally
chose the most efficient plan
select * from authors with (index=indexid)
Richard
-----Original Message-----
From: Lee, David [mailto:David.[Email Address Removed] Friday, 30 April 2004 12:26 AM
To: LazyDBA.com Discussion
Subject: query not using new index
I have been tasked with improving the performance of a query which is part
of a Delphi program to which I do not have the source. Using profile while
the program is running I identified the query and copied it to the Query
Analyser to work on it.
By creating an index on a certain field I managed to reduce the time in QA
from 58secs to 120ms. However, when I created the new index on the server
and ran the executable exactly as before but it does not use the new index.
How do I make the query use the new index?
thanks in advance
David Lee
DBA
Carlson Marketing
MS Sql Server LazyDBA home page