dbTalk Databases Forums  

deleting records takes forever

microsoft.public.sqlserver.clustering microsoft.public.sqlserver.clustering


Discuss deleting records takes forever in the microsoft.public.sqlserver.clustering forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
nunya@upyours.com
 
Posts: n/a

Default deleting records takes forever - 05-24-2005 , 09:11 PM






hi there.

I've got a bit of a problem on a clustered sql server. I don't know
if the cluster has anything to do with it, this is an entirely new
configuration for our company. We've moved out of the days of using
"white-box" pcs for servers to two dl380s clustered with an msa 1000
via fibre.

the servers are win2000 ent
mssql 2000 ent sp 3 (iirc)

with the advent of all this great technology, the big-brains
determined an excellent way to recoup costs of such an expense is to
release our dba. nice.

anyway. I've never run into this so I'm posting to this group, musing
whether this is due to clustering, table indexes or something else.

The cluster appears to be set up fine and we (small-brains) even
decided it was preduent to invest the money in calling MS for support.

Here'e the heart of the issue...

When deleting records from tables with indexes (mostly), by the index,
it takes absolutely forever. It took 8.5 hours to delete 1300 rows.
These are simple indexes, one field each, two indexes per table.

I say mostly because of the following:

· deleting by the index, long time
· deleting not by the index, fine execution
· some tables, not deleting by the index, long time

example, contract table has two indexes on enteredby and contractid
(there are other objects, sps, views, triggers, constraints, etc.)

delete * from contract where enteredby = 5 and contractid < 1000
extremely long time to execute

delete * from contract where enteredby = 5

and

delete from contract where contractid < 1000
extremely long time

delete from contract where program > 1
fine execution

in another table - reports - deleting anything from that table results
in a long execution time whether i'm using indexes or not.

Now, when I select into another table (iirc just copies the data) and
perform any of the above (even on the reports table) execution is
perfect. Deletes several hundred rows <1 second.

Can anyone give me some guidance here?

thanks




Reply With Quote
  #2  
Old   
nunya@upyours.com
 
Posts: n/a

Default Re: deleting records takes forever - 05-24-2005 , 09:22 PM






Quote:
delete * from contract where enteredby = 5 and contractid < 1000
yeah, I know i messed that up


Quote:
decided it was preduent to invest the money in calling MS for support.
that too if anyone else noticed





Reply With Quote
  #3  
Old   
slakejr@gmail.com
 
Posts: n/a

Default Re: deleting records takes forever - 05-26-2005 , 03:06 PM



Thanks for the suggestions.

In the event this ever gets indexed, it turned out that there were
constraints on the Comments table that referenced the Contract table.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.