Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Querying large tables using many conditions
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Querying large tables using many conditions
Divers
Thread ID:
00352719
Message ID:
00352719
Vues:
43
I'm curious to know what people think the best method of performing the following query.

I have a table of 1,000,000 customers. I also have a transaction table that has several million records in it. Providing table design is good, indexes are built correctly, and so forth, how would you recommend I query the transaction table for 450,000 of the customers? The only real way I have heard this far is to have a temp table that I insert the customer IDs into and then query the transaction table using the IDs from the temp table (customers.id = trasaction.custid). Do you agree this is the best way or is there another.

I want to keep traffic to the server down to a minimum. Using the method above, I will still have to do a one massive insert or several thousand inserts to the temp table.

Thanks for any ideas.
Thanks-

Lee Forst
Senior Project Manager
ProphetLine, Inc.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform