Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Long running query
Message
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Long running query
Divers
Thread ID:
00891920
Message ID:
00891920
Vues:
49
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
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform