Ranking Function Query with Result

Replace a SQL While loop and a cursor with ranking functions in SQL Server for better query performance

December 19, 2019 by

SQL While loop and cursor are the most common approach to repeat a statement on condition-based or determined limits. Loop and cursor can be utilized in a circumstance to deal with row-based processing in T-SQL. We generally observe moderate execution of old made procedures, which are composed of using loop and cursors. Those procedures take […]

Execution plan when using a system DMV instead of COUNT.

SQL Server Database Metrics

October 2, 2019 by

Summary There is a multitude of database metrics that we can collect and use to help us understand database and server resource consumption, as well as overall usage. This data can include hardware statistics, such as measures of CPU or memory consumed over time. We can also examine database metadata, including row counts, waits, and […]

Screenshot of Query Store fully enabled.

Performance Monitoring via SQL Server Query Store

August 19, 2019 by

SQL Server Query Store is a performance monitoring tool that helps us evaluate the performance of a SQL query in terms of several different performance metrics such as CPU and Memory Consumption, execution time and the I/O cycles consumed by the query. Query store is similar to the windows “Task Manager”. A task manager provides […]

Performance Monitor report showing data collection set captured for memory performance

SQL Server monitoring tools for memory performance

March 27, 2019 by

Memory pressure slowing down queries This article is the sequel in a series about SQL Server monitoring tools and common performance issues. The first article SQL Server monitoring tools for disk I/O performance is about how to detect and solve high input/output on hard disk subsystems when doing too much work during peak or maintenance […]

SQL Server performance counters (Batch Requests/sec or Transactions/sec): what to monitor and why

June 5, 2018 by

When maintaining SQL Server, it is essential to get an accurate perception of how busy it is. Two metrics that are often considered as indicators of how busy SQL Server is are Batch Requests/sec and Transaction/sec. When those metrics trend higher, they often affect all other metrics and make them go higher as well. While […]

BI performance counter: Page File % Usage

December 25, 2017 by

Applies to Operating System Description The current percentage of page file in use. If the Operating System is paging this can be problematic as SQL pages can be pushed into the page file, causing delays for SQL to read what it thinks is in memory from disk. This counter should be as close to zero […]

BI performance counter: Page/sec

December 25, 2017 by

Applies to Operating System Description Returns the paged to disk to resolve hard page faults. If the amounts are high (above 1000) this could indicate the server is running low on memory. This counter is the sum of Pages Input/sec and Pages Output/sec. Resolved by DBAs Suggested solutions Add additional memory Adjust the Max memory […]

BI performance counter: Pages Input/sec

December 25, 2017 by

Applies to Operating System Description Similar to Pages/sec except returns the number of read operations on the page file to resolve hard page faults. If the Pages/sec amount is higher than 1000 this could indicate the server is running low on memory. Page Input/sec and Page Reads/sec are very similar counters, Input/sec is the total […]

BI performance counter: Current Disk Queue Length

December 25, 2017 by

Applies to Operating System Description Returns the number of requests queued on the volume. Due to SANs and virtualization this counter is no longer valid to use. Resolved by DBAs Suggested solutions To determine disk performance issues, refer to Avg. Disk Read / sec and Avg. Disk Write / sec counters Additional research Examining and […]

BI performance counter: Avg. Disk Queue Length

December 25, 2017 by

Applies to Operating System Description Returns the average number of requests queued on the volume. Due to SANs and virtualization this counter is no longer valid to use. Resolved by DBAs Suggested solutions To determine disk performance issues, refer to Avg. Disk Read / sec and Avg. Disk Write / sec counters Additional research High […]

How to analyze SQL Server database performance using T-SQL

July 10, 2017 by

The performance of a database is the most challenging and critical part of database optimization. The challenge every DBA faces is to identify the most resource-intensive databases. This article talks about the natively available features that can accomplish the task of getting the required details of the entire database at a granular level.

How to analyze Storage Subsystem Performance in SQL Server

February 23, 2017 by

Introduction To improve performance, it is common for DBAs to search in each aspect except analyzing storage subsystem performance even though in many times, issues are, in fact, caused by poor storage subsystem performance. Therefore, I want to give you some tools and recommendation that you can use it to prevent your storage subsystem from […]

SQL Server Job Performance – Reporting

January 19, 2017 by

Description Once collected, job performance metrics can be used for a variety of reporting needs, from locating jobs that are not performing well to finding optimal release windows, scheduling maintenance, or trending over time. These techniques allow us to maintain insight into parts of SQL Server that are often not monitored enough and prevent job-related […]

SQL Server Job Performance – Tracking

January 19, 2017 by

Description Keeping track of our SQL Server Agent jobs is a very effective way to control scheduling, failures, and understand when undesired conditions may be manifesting themselves. This is a brief journey towards a solution that provides us far greater insight into our jobs, schedules, and executions than we can glean from SQL Server by […]

Filtered indexes: Performance analysis and hidden costs

December 11, 2015 by

Introduction Filtered indexes are well documented, as they have been around in SQL Server for almost six years now. Despite their longevity and usefulness, discussions of them tend to be very simple overviews using simple queries and not digging too deeply into more precise costs and benefits. This article is inspired by a production problem […]

Performance Dashboard Reports in SQL Server 2014

July 29, 2014 by

SQL Server Management Studio provides a set of standard reports that show basic performance information. These reports are available out of the box, no previous installation and configuration is needed. There are more than 20 reports that show usually required monitoring and troubleshooting information at the SQL Server instance level.

SQL Server Management Studio performance reports

July 24, 2014 by

Basic information about performance on a SQL Server instance is useful to at least scratch the surface of a performance issue. To be able to obtain this information, it’s not necessary to have a specialized monitoring tool that provides tiniest details. SQL Server Management Studio provides features that can quickly help.

Frequent query recompilations – a SQL query performance killer – detection

April 11, 2014 by

In the previous part of this article, we presented query recompilation basics. We explained when a query is compiled, when recompiled, and what preferred behavior is. We also showed the how to trigger a recompilation using T-SQL and provided examples. In this part, we will focus on detecting frequent query recompilations and frequently recompiled queries.