Quantcast
Channel: SQLServerCentral » SQL Server 2012 » SQL Server 2012 - T-SQL » Latest topics
Viewing all articles
Browse latest Browse all 4901

Update Statement - performance

$
0
0
Hi All,I need a help or a suggestionI have a SP which has an update statement and this updates around 200 columns and it is one record at a time. Out off 200 columns may be around 90 columns are calculated columns which uses a subquery for ex Update table1set col1 = (select count(1) from table2 where condtn1 = 'A'), col2 = (select count(1) from table2 where condtn1 = 'c'), col3 = (select count(1) from table3 where condtn1 = 'B'), ........ ........ col90 =(select count(1) from table3 where condtn1 = 'B'), where id = 123How can i work on the performance of this update statement, by creating temporaary tables or ny other way?Thanks in advance.Manzil

Viewing all articles
Browse latest Browse all 4901

Trending Articles