December 11, 2015 at 6:41 am
Hi All,
I have a table claimheader which has a primary key on ClaimID.
Several other tables are linked to this table via foreign key relationship on ClaimID column
When I am deleting values from this claimheader table, the query plan shows
Clustered index delete on Claimheader as well as all other related tables.
Is this actually an index rebuild or what exactly is this ?
Need explanation in simple terms ?
December 11, 2015 at 6:43 am
It's the operator which does the actual delete of the rows from the table. Looks like you have a cascading foreign key, so when you delete from the parent table, the linked rows are deleted from the child tables as well.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 11, 2015 at 6:46 am
Shouldn't there be an index rebuild as well ??
December 11, 2015 at 6:51 am
No. Why would there be?
Would you really want an index rebuild that could take hours in the middle of a delete query's execution?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 11, 2015 at 11:04 pm
Yes that was a silly question.
I was in confusion with NonClustered Indexes rebuild when clustered indexes are rebuild
December 12, 2015 at 4:28 am
Nonclustered indexes are not rebuilt when the clustered index is rebuild.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply