SQLRx® Tip of the Month
 
March 2015
______________________________________________________________________________
SQL 2008
SQL Server Performance Tuning:  I recently did some tuning work on a query that has computed columns in the SELECT. While the index that was being used by the query did contain columns used in the query's WHERE clause, performance was still not as fast as it could be. I checked the execution plan and could see that there were some parallelism operators, a non-clustered index scan with a key lookup on some computed columns that are part of the SELECT, but not in the WHERE clause. After adding the computed columns as included columns to the index being used, the parallelism and key lookup went away and the query really sped up.

CREATE NONCLUSTERED INDEX [ix_SQLRX_IncludeColIndex] ON [dbo].[Rebate]

([BranchId],[SupplierId],[ItemId],[ReceiveDt])

INCLUDE ([OnHandQty],[TotCostAmt],[PayDiscAmt],[EOMAmt],[EOQAmt],[EOYAmt],[RebateAmt])

ON [PRIMARY]

GO

 

 

More information from Microsoft here: https://msdn.microsoft.com/en-us/library/ms190806.aspx & https://msdn.microsoft.com/en-us/library/ms189292.aspx 



SQLRx has worked hard to minimize the impact of monitoring SQL Servers to the point that we are able to monitor high transaction systems with little impact (1% load) on the target system. Contact us today to help you monitor your SQL servers!    

As always, don't forget to regularly monitor the 11 VitalSigns  used by SQLRx to debug performance bottlenecks.

If you have a SQL question you'd like us to answer, and possibly use for the next SQLRx Tip of the Month, email it to us!  If you missed any of our previous tips, you can view them here.

For assistance or more information on optimizing your SQL Server Environment, visit us at www.sqlrx.com or email Lori Brown at lorib@isi85.com.


Sincerely,

 

Lori Brown | SQLRx Senior Consultant | Integrated Services, Inc.
4144 N. Central Expwy, Suite 430  |  Dallas, TX  75204
Phone: 214.526.7680 x 113 | 800.85.SQLRx


 


 

Integrated Services, Inc.                                    
2008 winner logo small
Turning Data Into Profit


 

30 Years of Credibility & Trust


 

Join our email list          Check out our events          SQLRx Downloads