Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Long running query
Message
De
02/04/2004 19:09:07
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00891920
Message ID:
00891937
Vues:
18
Do you have an indexes on dtrs and cwhouse?

Check the Execution Plan in QA for that statement to see if it is using any indexes.

>I've got a query that takes an AWFULLY long time to run:
>
>
>SELECT citemno, SUM(ntrfqty2) AS Shipped
>FROM icitrf
>WHERE (dtrs BETWEEN '02/01/04' AND '03/26/04')
>AND (cwhouse BETWEEN 'WAL0000' AND 'WAL9999')
>GROUP BY citemno
>
>
>Any hints at how I might optimize this? I have created indices on the obvious fields (dtrs, cwhouse and citemno) but it still takes forever to run.
>
>Granted, I'm running it against a table of 4 million rows but it's only returning a couple hundred result records...
>
>TIA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform