473,569 Members | 2,839 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What do you mean 'clustered' index?

A lot of detailed discussion explains the difference between clustered
and non-clustered indexes. But very few 'clarifies' why the term used
is 'clustered'. Well, once and for all, this is my take.

*** The 'CLUSTERED' adjective refers to the INDEX being clustered (set
adjacent) to the DATA.

This means if you found the index, the data is already there beside it
(you don't have to look anywhere else). From this note, everything
hopefully becomes clearer to you. (You can now read further in the tech
book :-).
So, the next time you are asked to explain what is a clustered (or
non-clustered ) index think of the above.

Jul 17 '06 #1
1 2301
Slight variation:

Data is clustered WITH the index, basically the index leaf level is the
actual data whereas on non-clustered indexes the leaf level of the index is
a copy of the data (just the key columns) and a bookmark (if table is a heap
then a pointer otherwise its a copy of the clustering key).

Tony.

--
Tony Rogerson
SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson - technical commentary from a SQL
Server Consultant
http://sqlserverfaq.com - free video tutorials
<an******@hotma il.comwrote in message
news:11******** **************@ 75g2000cwc.goog legroups.com...
>A lot of detailed discussion explains the difference between clustered
and non-clustered indexes. But very few 'clarifies' why the term used
is 'clustered'. Well, once and for all, this is my take.

*** The 'CLUSTERED' adjective refers to the INDEX being clustered (set
adjacent) to the DATA.

This means if you found the index, the data is already there beside it
(you don't have to look anywhere else). From this note, everything
hopefully becomes clearer to you. (You can now read further in the tech
book :-).
So, the next time you are asked to explain what is a clustered (or
non-clustered ) index think of the above.

Jul 17 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2253
by: Steve_CA | last post by:
Hi, The more I read, the more confused I'm getting ! (no wonder they say ignorance is bliss) I just got back from the bookstore and was flipping through some SQL Server Administration books. One says, that to get the best query performance, youi do two things:
4
3837
by: Tryfon Gavriel | last post by:
Hi all I recently noticed when trying to optimise a major query of a chess website I am the webmaster of, that adding an order by for "gamenumber" which is a clustered index field as in for example "order by timeleft desc, gamenumber desc" actually speeded up the queries and reduced sql server 2000 timeouts. I have an ASP error log and I am...
4
10549
by: serge | last post by:
I ran into a table that is used a lot. Well less than 100,000 records. Maybe not a lot of records but i believe this table is used often. The table has 26 fields, 9 indexes but no Primary Key at all! There are no table relationships defined in this database, no Natural keys, only Surrogate keys in the database. 1- Maybe an odd question...
5
6056
by: jim_geissman | last post by:
One table I manage has a clustered index, and it includes some varchar columns. When it is initially created, all the columns in the clustered index are populated, and then some of the longer varchars are populated through update queries. If the varchar columns are stored outside the clustered structure, then it would make sense to create...
7
1965
by: robertbrown1971 | last post by:
I just inherited a Java application with a fairly complex data model that does not yet have any indexes except those on primary keys. It is still in development and before I get to do any performance testing I want to put some default indexes on it. I realize that this a very vague request but it's better than nothing so I want to start with...
2
2828
by: Fred | last post by:
Let's say I suddenly discover that an unclustered table would benefit if it was clustered on column(s) already indexed. Currently, I'd need to drop that perfectly good index just to re-create it as a clustered index. Is that really necessary? It seems like DB2 should be able to update the catalog to note the change and let me run an inplace...
5
9713
by: pb648174 | last post by:
I've been doing a bit of reading and have read in quite a few places that an identity column is a good clustered index and that all or at least most tables should have a clustered index. The tool I used to generate tables made them all with non clustered indexes so I would like to drop all of them and generate clustered indexes. So my...
2
1803
by: ppuniversal | last post by:
Hi, I have a table in SQL Server 2000 with clustered index set on the Primary key. The primary key is a set of 5 fields(attributes). Now I want to add 1 more field into this clustered index as most of my queries are retrieving the data of this filed. When I tried to add this field into the index, SQL Server 2000 allows only to create a non...
1
1536
by: David Portas | last post by:
"Erland Sommarskog" <esquel@sommarskog.sewrote in message news:Xns9B5AD2ADD1265Yazorman@127.0.0.1... Erland, I'm sure you mean that to be with love and care, rather than just "slap on" any clustered index for the sake of it. :) A poorly chosen clustered index could be worse than none at all. --
0
7695
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7922
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8119
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6281
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5509
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5218
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
936
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.