Need quey for update large database fastly
-
Montag, 4. März 2013 05:58
Hi,
currently i have a table with 80 crore rows data ,I need to obfucate the data in some columns for eg:-If name is 'David Peter' (Same name is used in differnet rows),then i need to update it with some other values like 'ytfr trey'.Now what we do is we have a table with column data like 'ytfr trey' and we are updating randomly the in the table based on rownumber function but this take so much of time .So what i need is a sql query having the logic to update like this eg:-If ABCD is name then i need to update it with CDEF ie two letter difference or some different name but query should update data fastly
Regards
Jon
Alle Antworten
-
Montag, 4. März 2013 09:39
Hi - maybe its the 'order by' part of the row_number which is causing the overhead...
Have a look in the estimated execution plan ot the query (CTRL + L) and see if the 'sort' is taking a larger percentage
you could replace the order by seciton of rownumber with order by (select null) instead if the ordering is not actually important.
Just an idea ...
MCSA: (SQL 2012, SQL 2008, Windows Server 2008) MCITP: (SQL BI & SQL 2008) MCT: 2000 - 2013 SQL Training
- Bearbeitet Lawrence A. Freeman Montag, 4. März 2013 09:39
- Als Antwort markiert Eileen ZhaoMicrosoft Contingent Staff, Moderator Donnerstag, 14. März 2013 08:44

