|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
(Update or Delete) Which is faster.
Does anyone know if it is faster to update a record with a delete flag or to delete the record.
-Bill |
|
#2
|
||||
|
||||
|
as far as most people are concerned, they are the same
if you wish to delve further into this, then you will have to set up some representative tables and do some timings you see, the difference depends on a whole range of conditions, such as - number of columns in the table - number of indexes on those columns - size of the table - number of concurrent users - et cetera have you done any timing tests yet yourself? |
|
#3
|
|||
|
|||
|
Yes. I have to clean the data for bad data and I have 3 statements that run. It is considerably faster to make the 3 statements updates and have one massive delete than to do 3 deletes. Just was wondering if it was my weird setup.
Just seems like it would be more work for the computer and take longer. But I'm sticking with what works on my servers lol -Bill |
|
#4
|
||||
|
||||
|
Quote:
been there, wrote the queries if you had said initially that you need to run three statements, i woulda said to use updates right away ![]() especially if they all have to take effect in order for a row to be eligible for deletion |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > (Update or Delete) Which is faster. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|