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.
| Author |
Topic |
|
Ex
Posting Yak Master
166 Posts |
Posted - 2006-08-03 : 21:38:07
|
| Hey guys/gals,Just doing some administration on a database and kinda stumped.I have a table with 40 columns (mostly ints, not large data types)and over 40000 records.For some reason the deletes are taking a long time, however I cannot figure out why.My deletes are usually only removing 5-10 records at a time however they are taking alot longer than deletes on other tables of the same size.There are no delete triggers or cascade deletes on this table.My delete statement is simple and deleting on one columni.e delete from myTable where colX = 123note: I am not deleting on the primary key however the column I am deleting on has a index .Just wondering what I should be looking for to figure out why it’s deleting slow?I looked at the execution plan and it had a clustered index scan taking up 98% of the execution time, cant exactly remember if this is really bad or normal?---------I love DBA's (HUG) However I am a evil App Developer |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2006-08-03 : 21:51:05
|
| Are there any foreign keys pointing to the table you're deleting from ?Damian"A foolish consistency is the hobgoblin of little minds." - Emerson |
 |
|
|
Ex
Posting Yak Master
166 Posts |
Posted - 2006-08-03 : 22:14:08
|
| ah think i found the problem with a index on one of my forign tables :) thanksThe index had another column in it so there was no index of the foreign key :) ---------I love DBA's (HUG) However I am a evil App Developer |
 |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2006-08-04 : 00:50:49
|
That's what I suspected it would be.A similar problem had me tearing my hair out until 3am once Damian"A foolish consistency is the hobgoblin of little minds." - Emerson |
 |
|
|
|
|
|