Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is INLIST() in SQL Server optimized?
Message
 
 
À
18/05/2008 06:26:46
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01316947
Message ID:
01317999
Vues:
10
>>
>>But as I look at your example, I am wondering what is better/faster/more efficient: 1. Creating a temp table and, say, inserting 20 or 50 rows into the temp table (which means calling SQLExec so many times. Or 2. Creating a string of values to be used in the IN clause of one SQL Select against the "myTable" without temp table. What is your (and others) feeling on that?
>
>It can be a single SQLexec call. Speed depends. If all would be done in a single call then building the IN list create a shorter command to send over the wire. If values would be send at different times thenthe table approach might be better.
>One or the other SQL server process it fast.
>Cetin

Thank you, Cetin.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform