You are here: Re: Sequence of columns in primary key « MsSQL Server « IT news, forums, messages
Re: Sequence of columns in primary key

Posted by Erland Sommarskog on 10/16/07 11:30

Robert Klemme (bob.news@gmx.net) writes:
> Erland Sommarskog wrote:
>> (gilles27@talk21.com) writes:
>>> Our review of the primary keys was triggered by one of our customers
>>> complaining about the performance of the database. They claimed to
>>> have "re-sequenced the primary key which reduced Index reads by a
>>> factor of 5". Do you have any idea as to how they arrived at this
>>> conclusion?
>>
>> Sounds like hogwash to me.
>
> I don't know the table structure and queries but there actually are
> scenarios with different queries against the same table where the overall
> benefit of reordering columns is significant.

Of course there is. The main recommendation of this thread is that
the PK of the table in question should be reordered. The "normal"
order is (Ledger, OrderNumber, OrderLineNumber), and this was, I assume,
the original order. What I referred to as hogwash was the claim that
reordering the index so that OrderLineNumber and OrderNumber changed
places reduced index reads by a factor 5.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp

 

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

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