var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Which one is faster?
Hi everyone -
Would it be faster to create a cursor and have it loop
through the result set calling another stored procedure
that actually performs the delete...
would it be faster to create a temp table based on a query
and have the delete statement perform a delete where in
I am trying to get an idea prior to doing the task for myself,
hoping someone with much more knowledge than me has
accomplished this before...
I suspect that the answer to that is "it depends"...
How many rows are you likely going to delete?
Do you have enough log space to perform the delete as single transaction?
The answer to your question is...
but for the testing enviroment, it will be about 320,000 records...
perhaps i should place a commit between each
thanks for the reply
Why do you need a cursor or a temp table? Just delete based on a query.
from salesdetail, titles
where salesdetail.title_id = titles.title_id
and type = "business"
if your intention is to delete specific data sets is it possible for you to select data which has to be retained into a new temp table, truncate the old one and copy back again. just a thought as this could be faster operation than deleting each record ( and possibly committing after every record as well ).