Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Teaser
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
Re: Teaser
Miscellaneous
Thread ID:
00185277
Message ID:
00187896
Views:
21
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform