You are here: Re: indexes « MsSQL Server « IT news, forums, messages
Re: indexes

Posted by Erland Sommarskog on 10/18/07 21:22

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/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация