dbTalk Databases Forums  

indexes

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss indexes in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
MikeJ
 
Posts: n/a

Default indexes - 10-18-2007 , 02:17 PM






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



Reply With Quote
  #2  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: indexes - 10-18-2007 , 04:22 PM






MikeJ (analizer1 (AT) yahoo (DOT) com) writes:
Quote:
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 (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.