Showing posts with label forever. Show all posts
Showing posts with label forever. Show all posts

Thursday, March 29, 2012

deleting records takes forever

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
>delete * from contract where enteredby = 5 and contractid < 1000
yeah, I know i messed that up

> decided it was preduent to invest the money in calling MS for support.
that too if anyone else noticed
|||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.

Monday, March 19, 2012

Deleting a Bunch of Reports

I need to delete a bunch of reports out of a folder in my reporting site. I can delete them one at a time, but it takes forever. I found a procedure in the database called 'DeleteObject.' It appears that this will do it for me. I just feed it the path of each report I want to delete. I tried it and it fails at the last statement in the proc. What am I doing wrong. Is it possible to do this?
Thanks.Probably not an answer to your question but just curious..


I just feed it the path of each report I want to delete.


Path of each report ? Arent you better off deleting them directly from the folder if you have to manually give the path of each report ?|||It would be if it didn't take forever to go through them all. Clicking is the easy, quick part. The problem is that you click on the report, you then have to click on the Properties tab, then click 'Delete' and then wait several seconds for the delete to take place. If the report has no parameters, it starts to generate automatically when you click on it, and (I believe) that once the report is processing, it can't be deleted until it's done. At least my experience with it leads me to believe that. So, it would take a heck of a lot less time to concatenate a statement together from a select of the path and run each one from query analyzer.
Thanks for the reply, though.

Friday, March 9, 2012

deleted many records, want to stop that replication

I deleted tons of recors in one table on the publisher. I want to stop
those from replicating (for the time being or forever - doesn't matter)
since it is sucking all of the replication time.
Is there a way to do that, if so, how?
Darin
*** Sent via Developersdex http://www.codecomments.com ***
More specifics would be helpful for us to answer the question. You said you
want to stop "those" from replicating. What are "those"? The more
information you send (within reason! "It all started when I was a
child..."), the better chances are that someone can answer.
Thanks,
Mike
"Darin" <darin_nospam@.nospamever> wrote in message
news:%23fL8GalNFHA.576@.TK2MSFTNGP15.phx.gbl...
> I deleted tons of recors in one table on the publisher. I want to stop
> those from replicating (for the time being or forever - doesn't matter)
> since it is sucking all of the replication time.
> Is there a way to do that, if so, how?
> Darin
> *** Sent via Developersdex http://www.codecomments.com ***