SQLRx® Tip of the Month
 
June 2015
______________________________________________________________________________
SQL 2008

SQL Server Administration:  There are two new system views and two system views that have new columns added in SQL 2014. Most notable is sys.databases since this is widely used.  

 

 

 

 

  • sys.xml_indexes - Has 3 new columns: xml_index_type, xml_index_type_description, and path_id.

https://msdn.microsoft.com/en-us/library/ms176003.aspx

  • sys.databases - Has 3 new columns: is_auto_create_stats_incremental_on, is_query_store_on, and resource_pool_id.

https://msdn.microsoft.com/en-us/library/ms178534.aspx

  • sys.column_store_row_groups - New view. Provides clustered ColumnStore Index information on a per-segment basis to help determine which row groups have a high percentage of deleted rows and should be rebuilt.

https://msdn.microsoft.com/en-us/library/dn223749.aspx

  • sys.dm_exec_query_profiles - New view. Monitors real time query progress while a query is in execution.

https://msdn.microsoft.com/en-us/library/dn223301.aspx

--Configure query for profiling with sys.dm_exec_query_profiles

SETSTATISTICSPROFILEON

GO

--Optionally return the final results of the query to SHOWPLAN XML

SET SHOWPLAN XMLON

GO

--Next, run a query in this session

SELECT*

FROM RunningRoutes rt

CROSSJOIN RoadRaces race

WHERE [State] ='TX'

 

--Run this in a different session than the session in which your query is running.

--Serialize the requests and return the final results to SHOWPLAN XML

SELECT

       node_id,physical_operator_name,SUM(row_count) row_count,SUM(estimate_row_count)AS estimate_row_count,

   CAST(SUM(row_count)*100 ASfloat)/SUM(estimate_row_count)

FROMsys.dm_exec_query_profiles

WHERE session_id=<<your session id>>

GROUPBY node_id,physical_operator_name

ORDERBY node_id



 

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.



 

Phone: 214.526.7680 x 113

Toll free:  800.85.SQLRx  (x113)

https://sqlrx.wordpress.com/

@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