Hi All,
In the database I'm currently working on (which deals with coal mining), a huge performance slowdown suddenly came up. The table that assigns cars to a coal train is taking forever to delete or insert. There are only 10 columns, and a typical train assignment is about 120 cars (rows) to one train. I created a test record which consisted of three cars, and attempted to manually delete from the car table using the query analyzer. My statement was such:
delete from unit_train_car_tracking
where train_id = 'blablablah'
and year_shipped = 2001
If I run select * from instead of delete from it takes less than one second as there are only three rows. However, deleting takes 41 seconds! The table has both a clustered and non-clustered index, both of which I am not too familiar with.
Any ideas on the delay?
Thanks,
Dan Lynn
In the database I'm currently working on (which deals with coal mining), a huge performance slowdown suddenly came up. The table that assigns cars to a coal train is taking forever to delete or insert. There are only 10 columns, and a typical train assignment is about 120 cars (rows) to one train. I created a test record which consisted of three cars, and attempted to manually delete from the car table using the query analyzer. My statement was such:
delete from unit_train_car_tracking
where train_id = 'blablablah'
and year_shipped = 2001
If I run select * from instead of delete from it takes less than one second as there are only three rows. However, deleting takes 41 seconds! The table has both a clustered and non-clustered index, both of which I am not too familiar with.
Any ideas on the delay?
Thanks,
Dan Lynn