Tempdb Metadata Contention in SQL Server - Table Variable Vs Temporary Table[MP4] [0:16:22] [2016/06/06]In SQL Server, the concurrent creation of temporary tables from many sessions can lead to tempdb metadata contention. Tempdb metadata contention does not affect the concurrent creation of table…
AlwaysOn Availability Groups Synchronous Replica Readable Secondary Data Access Latency[MP4] [0:08:49] [2016/06/06]With SQL Server AlwaysOn Availability Groups, when you configure a secondary in synchronous-commit mode for read-only access, there can be data access latency. If you make changes to your data like if…
Seek or Scan - Cost Based Optimizer in SQL Server[MP4] [0:17:59] [2016/06/06]When SQL Server has a choice of plans, it will compare the cost among a set of execution plans and will choose the cheapest one. In some cases, even though the cost of seek is slightly higher than the…
Optimize for Ad Hoc Workloads - SQL Server Configuration Parameter[MP4] [0:23:11] [2016/06/06]SQL Server configuration parameter "optimized for ad hoc workloads" can be very useful when you execute lots of single use ad hoc statements or dynamic SQL statements by reducing memory…
Extended Event Locks Lock Waits in SQL Server[MP4] [0:09:34] [2016/06/06]When it comes to lock waits, one of the important information we need to know is which statement waited for locks and how long. This is possible with extended events; it is not possible with SQL…
Extended Event Query Post Execution Showplan in SQL Server[MP4] [0:11:11] [2016/06/06]Query Post Execution Showplan event is a very useful event to find problematic queries and execution plans based on CPU usage or duration while analyzing performance issues. It can increase the…
PAGELATCH Waits with Update Statements in SQL Server - PAGELATCH_EX and PAGELATCH_SH[MP4] [0:12:42] [2016/06/06]In SQL Server, concurrent writes or read / write to the same page can lead to PAGELATCH (like PAGELATCH_EX and PAGELATCH_SH) waits or what is knowns as PAGELATCH contention. One common use case is…
Tempdb Allocation Contention in SQL Server[MP4] [0:17:06] [2016/06/06]In SQL Server, the concurrent creation of temporary objects (temporary tables and table variables) from many sessions can lead to tempdb allocation contention. This contention occurs on PFS and SGAM…
In-Memory OLTP Memory Optimized Table Variables Vs Disk Based Table Variable in SQL Server[MP4] [0:12:58] [2016/06/06]Starting SQL Server 2014, it is possible to use memory optimized table variables. These are table variables declared using a table type which is memory optimized. Memory optimized table variables have…
Temp Table Caching in SQL Server[MP4] [0:16:05] [2016/06/06]SQL Server caches temporary objects (temporary tables and table variables), that are created in a stored procedure. Temporary objects that are created either in dynamic SQL statement or by using…
Filtered Statistics in SQL Server[MP4] [0:12:39] [2016/06/06]In SQL Server, Filtered Statistics can improve cardinality estimation, i.e. when joining lookup table, or while joining fact table and dimension table. For this reason, SQL Server supports the…
Parallel Insert Into - Table Variable Vs Temporary Table in SQL Server[MP4] [0:06:02] [2016/06/06]In SQL Server, for insert into select statements, when the target for insert into is temporary table, the select statement can execute in parallel. When the target is table variable, SQL Server will…
Cardinality Estimation - Table Variable Vs Temporary Table in SQL Server[MP4] [0:14:33] [2016/06/06]SQL Server creates and maintains statistics for temporary tables, which lead to better cardinality estimation and optimal execution plan generation. Table variables have no statistics, which can…
Understanding ASYNC_NETWORK_IO Waits in SQL Server[MP4] [0:14:35] [2016/06/06]In SQL Server, ASYNC_NETWORK_IO wait time can be high due to slow network, like when the database is in the cloud and the application is on premise. Furthermore, it can be slow when CPU utilization is…
Resource Governor in SQL Server - Workload Throttling[MP4] [0:26:42] [2016/06/06]Resource Governor in SQL Server provides CPU, Memory and I/O throttling. In SQL Server 2014 and earlier, CPU throttling works only for similar kind of workloads and not for mixed workloads, where high…
Data Compression in SQL Server - Pros and Cons[MP4] [0:25:04] [2016/06/06]SQL Server supports row and page compression on tables, indexes and partitions. This can lead to reduced I/O and better performance. However, it can also result in additional CPU usage in some cases,…
SQL Server Command Timeout - Application Timeout - Extended Event Attention[MP4] [0:23:02] [2016/06/06]When you use ODBC or SqlClient to access data from SQL Server, by default the query will be cancelled if there is no response from the server within a certain period of time (30 seconds by default).…