indexes
am 18.10.2007 21:17:42 von Dave Pi have a question about indexes
if i create a index on 3 columns
int int int
id1 id2 id3
does SqlServer build the index from left to right based on the data in each
column
Tks
Mike
i have a question about indexes
if i create a index on 3 columns
int int int
id1 id2 id3
does SqlServer build the index from left to right based on the data in each
column
Tks
Mike
MikeJ (analizer1@yahoo.com) writes:
> i have a question about indexes
> if i create a index on 3 columns
> int int int
> id1 id2 id3
>
> does SqlServer build the index from left to right based on the data in
> each column
I'm not sure if I understand the question. Or even what left and right
might be in this context.
But if have these 8 rows:
id1 id2 id3
12 1 -2
12 1 23
12 2 9
12 2 19
14 145 1992
15 -2 4711
15 -2 4712
15 6 0
The rows will appear in the index in that order.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downlo ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books .mspx