Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Optimizing JOIN
Message
De
30/09/2003 08:21:43
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Divers
Thread ID:
00833349
Message ID:
00833415
Vues:
28
Start with the query plan. What does it look like?

>> am I doomed 'cause of amount of records returned?

one million rows is a lot to collect and bring across the wire.

-Mike

>First, I have a table called "Deceased" that holds over 6 million names and addresses of deceased persons. I need to do a JOIN on "ZipCross" table that holds all the zipcodes that were mailed for a particular direct mail campaign. Here is my SQL statement:
>
>SELECT Deceased.* FROM Deceased JOIN ZipCross ON Deceased.Zip=Zipcross.Zip
>JOIN AreaOrder C ON B.AreaID=C.AreaID AND C.CampaignID=300
>
>The problem is that this query takes almost 5 minutes to complete. Of course it doesn't help that the resulting recordset is over one million records. Anyone with ideas to make this query faster or am I doomed 'cause of amount of records returned? TIA.
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform