Hi,
This Query :
SELECT 0
FROM
WOTransit -- with (index=x1,readuncommitted)
INNER JOIN WO On WoTransit.Wo_ref=Wo.Wo_ref
WHERE WO.Cmd_No=814352
AND ISNULL(WOTransit.Charge_ref,0) <> 0
Since this morning this query is much more slow than usual
If i add : "with (index=x1,readuncommitted) ", the speed
is back to normal. because analyser usually use that
index.
If not, analyser is using a clustered index that is not
related to the query.
why doesn't he use the right index ?
What can i do to fix that ? i allready ran UPDATEUSAGE
and no change.
Thank you !
DonaldHave you rebuilt or defragged the x1 index?
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
"Donald" <anonymous@.discussions.microsoft.com> wrote in message
news:1c5c901c4522c$62730400$a001280a@.phx
.gbl...
> Hi,
> This Query :
> SELECT 0
> FROM
> WOTransit -- with (index=x1,readuncommitted)
> INNER JOIN WO On WoTransit.Wo_ref=Wo.Wo_ref
> WHERE WO.Cmd_No=814352
> AND ISNULL(WOTransit.Charge_ref,0) <> 0
>
> Since this morning this query is much more slow than usual
> If i add : "with (index=x1,readuncommitted) ", the speed
> is back to normal. because analyser usually use that
> index.
> If not, analyser is using a clustered index that is not
> related to the query.
> why doesn't he use the right index ?
> What can i do to fix that ? i allready ran UPDATEUSAGE
> and no change.
> Thank you !
> Donald|||Yes,
i dropped X1 index and recreated it
>--Original Message--
>Have you rebuilt or defragged the x1 index?
>--
>Kevin Hill
>President
>3NF Consulting
>www.3nf-inc.com/NewsGroups.htm
>www.DallasDBAs.com/forum - new DB forum for Dallas/Ft.
Worth area DBAs.
>"Donald" <anonymous@.discussions.microsoft.com> wrote in
message
> news:1c5c901c4522c$62730400$a001280a@.phx
.gbl...
usual[vbcol=seagreen]
>
>.
>|||This is what I usually do. Compare the actual plan and estimated plan
(without the hint). Look for areas where the number of rows differ greatly.
Try to understand why the estimate is way-off here. You might need to
update the statistics with the FULLSCAN option in order for SQL Server to
make better estimates.
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backups? Try MiniSQLBackup
"Donald" <anonymous@.discussions.microsoft.com> wrote in message
news:1c5c901c4522c$62730400$a001280a@.phx
.gbl...
> Hi,
> This Query :
> SELECT 0
> FROM
> WOTransit -- with (index=x1,readuncommitted)
> INNER JOIN WO On WoTransit.Wo_ref=Wo.Wo_ref
> WHERE WO.Cmd_No=814352
> AND ISNULL(WOTransit.Charge_ref,0) <> 0
>
> Since this morning this query is much more slow than usual
> If i add : "with (index=x1,readuncommitted) ", the speed
> is back to normal. because analyser usually use that
> index.
> If not, analyser is using a clustered index that is not
> related to the query.
> why doesn't he use the right index ?
> What can i do to fix that ? i allready ran UPDATEUSAGE
> and no change.
> Thank you !
> Donald
Thursday, March 22, 2012
Analyser no using right index
Labels:
0fromwotransit,
analyser,
cmd_no814352and,
database,
index,
indexx1,
inner,
microsoft,
mysql,
oracle,
query,
readuncommitted,
select,
server,
sql,
wo_refwhere,
wo_refwo,
wotransit
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment