How to speed up update table against views
Posted on 2006-06-13
I have a table, table_1, which contained half million records. I am updating it with more than 10 views once at a time. And it takes me forever. I didn't create any index for those views. I do created a cluster index and copule index for the table. One of the updating scripts like the following:
SET table.product = 'Book'
FROM table_1 ,vw_2005
WHERE (table_1.ACCOUNT_ID = vw_2005.ACCOUNT_ID)
AND (table_1.[YEAR] = 2005)
AND (table_1.product IS NULL)
My question is
A. how can I speed up the update process?
B. Should I add those options to those views?
"SET NUMERIC_ROUNDABORT OFF
SET ANSI_PADDING,ANSI_WARNINGS,CONCAT_NULL_YIELDS_NULL,ARITHABORT,QUOTED_IDENTIFIER,ANSI_NULLS ON
C. should I add the statment "WITH SCHEMABINDING " to the create view line?