Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optimizing JOIN
Message
From
30/09/2003 08:21:43
 
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Miscellaneous
Thread ID:
00833349
Message ID:
00833415
Views:
27
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform