Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Lennart Jonsson Newsgroups: comp.databases.ms-sqlserver Subject: question on clustered indexes in sql-server Date: Tue, 29 Nov 2011 16:39:57 +0100 Organization: A noiseless patient Spider Lines: 18 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Injection-Date: Tue, 29 Nov 2011 15:40:00 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="ea/GVBKKbWf16J2shRyUPw"; logging-data="30535"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX182EG+cWmH8Hpeuu7KBtYXT" User-Agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111105 Thunderbird/8.0 Cancel-Lock: sha1:5Tl7w8UcDIEIyvVBzHx7iSd2Ph8= Xref: x330-a1.tempe.blueboxinc.net comp.databases.ms-sqlserver:847 What is the purpose of a clustered index in sql-server (as you probably have guessed I have zero to none experience with sql-server)? The reason I ask is because I look at a databas where more or less all tables are designed as: create table T ( x int IDENTITY(1,1) NOT NULL, [...] CONSTRAINT ... PRIMARY KEY CLUSTERED ( x ) ... In db2 I would look at range predicates and order by clauses on queries to determine what index that should be clustered (inorder to avoid sorts). What is the rationale to use a clustering index like the one above? /Lennart