Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Clustered indexes

Author  Topic 

steel
Posting Yak Master

107 Posts

Posted - 2008-12-28 : 02:57:09
Dear All,

Hi I have a question in my mind that when we apply a clustered index on a table and when the data is inserted into the table the data is oriented physically as the way the index is present.but when we delete rows from the table,does the index value for that row is deleted from the index (data structure) or merely replaced by null pointer to the row.

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2008-12-28 : 09:36:13
When you delete a row, the row is removed from the clustered index and any nonclustered indexes on the table. The clustered index is the table, the leaf pages of the cluster are the data pages, so the lowest level of a clustered index has no pointers to anywhere else.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

steel
Posting Yak Master

107 Posts

Posted - 2009-01-02 : 15:55:31
Thanx for ur reply but please elaborate............
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2009-01-02 : 16:34:01
well first ask what you did not understand. first you have to know what clustere index is (a balanced B-tree). once you know this you'll understand how it works.

in short, the when a row is deleted from a page the place in that page is cleared, but the page itself is not compressed. the logical index structure isn't affected by this.


___________________________________________________________________________
Causing trouble since 1980
Blog: http://weblogs.sqlteam.com/mladenp
Speed up SSMS development: www.ssmstoolspack.com <- version 1.1 out!
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2009-01-03 : 09:24:18
quote:
Originally posted by steel

Thanx for ur reply but please elaborate............



What do you want elaborating?

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -