execution plan Archives - {coding}Sight https://codingsight.com/tag/execution-plan/ Blog for SQL Server DBAs and Developers Tue, 27 Jun 2023 04:28:32 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.2 https://codingsight.com/wp-content/uploads/2021/10/cropped-Soсial_-Fb_180х180-1-32x32.png execution plan Archives - {coding}Sight https://codingsight.com/tag/execution-plan/ 32 32 Top 3 Tips You Need to Know to Write Faster SQL Views https://codingsight.com/top-3-tips-you-need-to-know-to-write-faster-sql-views/ Thu, 03 Dec 2020 11:37:37 +0000 https://codingsight.com/?p=11061 Friend or foe? SQL Server views have been a subject of heated debates when I was in my first year using SQL Server. They said it was bad because it was slow. But how about today? Are you on the same boat as I was many years ago? Then, join me on this journey to …

The post Top 3 Tips You Need to Know to Write Faster SQL Views appeared first on {coding}Sight.

]]>
Parameter Sniffing Primer https://codingsight.com/parameter-sniffing-primer/ Fri, 28 Jun 2019 05:00:33 +0000 https://codingsight.com/?p=7103 Introduction Developers are often told to use stored procedures in order to avoid the so-called ad hoc queries which can result in unnecessary bloating of the plan cache. You see, when recurrent SQL code is written inconsistently or when there’s code that generates dynamic SQL on the fly, SQL Server has a tendency to create …

The post Parameter Sniffing Primer appeared first on {coding}Sight.

]]>
Compare Execution Plans in SQL Server https://codingsight.com/compare-execution-plans-in-sql-server/ Fri, 10 Aug 2018 10:47:54 +0000 http://codingsight.com/?p=4947 Database Administrator always makes an effort to tune SQL Server query performance. The first step in tuning query performance is to analyze the execution plan of a query. Upon some conditions, SQL Server Query Optimizer can create different execution plans. At this point, I would like to add some notes about SQL Server Query Optimizer. …

The post Compare Execution Plans in SQL Server appeared first on {coding}Sight.

]]>
Exploring SQL Server 2016 Query Store GUI https://codingsight.com/exploring-sql-server-2016-query-store-gui/ Fri, 01 Jun 2018 09:25:10 +0000 http://codingsight.com/?p=4154 Introduction Query store is a new feature, introduced in SQL Server 2016, that allows database administrators to historically review queries and their associated plans using the GUI available in SQL Server Management Studio, as well as to analyze query performance using certain Dynamic Management Views. Query Store is a database scoped configuration option and is available …

The post Exploring SQL Server 2016 Query Store GUI appeared first on {coding}Sight.

]]>
SQL Server Database Scoped Configurations and Automatic Plan Correction https://codingsight.com/sql-server-database-scoped-configurations-and-automatic-plan-correction/ Fri, 13 Apr 2018 11:32:38 +0000 http://codingsight.com/?p=3835 In this article, we will examine Database Scoped Configurations and SQL Server 2017 Automatic Plan Correction. Microsoft added new features to SQL Server 2017 that improved the query performance. SQL Server query performance is related to quality and accuracy of the execution plan. When we run a query, the query optimizer analyzes a lot of …

The post SQL Server Database Scoped Configurations and Automatic Plan Correction appeared first on {coding}Sight.

]]>
T-SQL BEST Practices https://codingsight.com/t-sql-best-practices/ https://codingsight.com/t-sql-best-practices/#comments Tue, 20 Feb 2018 18:44:36 +0000 http://codingsight.com/?p=3368 In this article, we will discover some best practices of T-SQL queries. Badly written queries can cause performance and I/O problems. For this reason, we should pay attention to keep some rules in our mind when writing T-SQL queries. Don’t use “SELECT * “ in queries When we write a query, we  need to  select …

The post T-SQL BEST Practices appeared first on {coding}Sight.

]]>
https://codingsight.com/t-sql-best-practices/feed/ 3
SQL Server Trigger: Understanding and Alternatives https://codingsight.com/sql-server-triggers-understanding-alternatives/ Tue, 30 Jan 2018 13:59:43 +0000 http://codingsight.com/?p=3235 The SQL Server trigger is a special type of stored procedures that is automatically executed when an event occurs in a specific database server. SQL Server provides us with two main types of triggers: the DML Triggers and the DDL triggers. The DDL triggers will be fired in response to different Data Definition Language (DDL) …

The post SQL Server Trigger: Understanding and Alternatives appeared first on {coding}Sight.

]]>
Example of Improving Query Performance with Indexes https://codingsight.com/example-of-improving-query-performance-with-indexes/ Tue, 09 Jan 2018 11:38:17 +0000 http://codingsight.com/?p=3015 In this article, we’ll look at how an index can improve the query performance. Indexes in Oracle and other databases are objects that store references to data in other tables. They are used to improve the query performance, most often the SELECT statement. They aren’t a “silver bullet” – they don’t always solve performance problems …

The post Example of Improving Query Performance with Indexes appeared first on {coding}Sight.

]]>
Implementing a Common MS SQL Server Performance Indicator https://codingsight.com/implementing-a-common-ms-sql-server-performance-indicator/ Fri, 05 Jan 2018 14:05:32 +0000 http://codingsight.com/?p=3006 Introduction There is often a need to create a performance indicator that would show database activity related to the previous period or specific day. In the article titled “Implementing SQL Server Performance Indicator for Queries, Stored Procedures, and Triggers”, we provided an example of implementing this indicator. In this article, we are going to describe …

The post Implementing a Common MS SQL Server Performance Indicator appeared first on {coding}Sight.

]]>
Missing Indexes in MS SQL or Optimization in no Time https://codingsight.com/missing-indexes-in-ms-sql-or-optimization-in-no-time/ https://codingsight.com/missing-indexes-in-ms-sql-or-optimization-in-no-time/#comments Thu, 28 Dec 2017 12:28:20 +0000 http://codingsight.com/?p=2967 When executing a query, the SQL Server optimizer tries to find the best query plan based on existing indexes and available latest statistics for a reasonable time, of course, if this plan is not already stored in the server cache. If no, the query is executed according to this plan, and the plan is stored …

The post Missing Indexes in MS SQL or Optimization in no Time appeared first on {coding}Sight.

]]>
https://codingsight.com/missing-indexes-in-ms-sql-or-optimization-in-no-time/feed/ 1