Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Teaser
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
Re: Teaser
Divers
Thread ID:
00185277
Message ID:
00187896
Vues:
19
>Hi Michael:
>
>I'm guessing that SELECT MIN(column1), MAX(column1) FROM table does based upon the NC criteria that was specified.
>
>What's the answer<s>.
>
>CT


You correct. Since SQL Server 6.5 cannot traverse an index twice in the same query, the optimizer will scan the leaf level of the NC picking the first key for the MIN and the last for the MAX. Since the other query used a subquery to solve the MAX, the optimizer can traverse the index, once for each query (the inner and the outer).

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform