Tag Info

New answers tagged


Assuming your desired uniqueness constraint is (one,two), here is one way to do it: DELETE FROM session.test WHERE (one, two) IN ( SELECT one, two FROM session.test GROUP BY one, two HAVING COUNT(*) > 1 )


In my experience, DML statements over Linked Servers is sllooowww (I believe that is the proper, technical spelling of this particular type of slowness ;-). I found that the following setup was mucho faster: Create a stored procedure on the remote server: Call it something like RemoteTable_DeleteByEntryIDList It should accept an NVARCHAR(MAX) parameter ...


Oracle (as well as any other RDMS) doesn't scan "rows". It operates with blocks (other vendors may use different terminology , e.g. page) , and it doesn't know which blocks have or don't have rows. Also, sequential read is much faster than random , and it's way cheaper to read more than needed into memory... A good graphical explanation of HWM : ...


If the objective is to be able to sort the rows according to row_number then don't bother updating values on a delete. The rows will come out in the same order after a row is deleted as they would before. It is not worth the effort to close up the gaps. In the worst case, if you delete the lowest-numbered row, you will have to update every remaining row ...

Top 50 recent answers are included