1116
Part VIII: Performance Tuning and Optimization
FIGURE 49-2
When a query with a WHERE clause restriction that includes the partition key retrieves data
through the partition view, SQL Server’s query processor accesses only the required tables.
The following UPDATE query demonstrates updating through the SalesOrderAll view:
UPDATE SalesOrderAll
SET OrderDate = GETDATE()
WHERE SalesPersonID = 280
Unfortunately, an UPDATE does not benefi t from query optimization to the extent that a
SELECT does. For heavy transactional processing at the stored-procedure level, the code
should access the correct partition table.
c49.indd 1116c49.indd 1116 7/31/2012 10:24:23 AM7/31/2012 10:24:23 AM
http://www.it-ebooks.info