Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
T-SQL Execution Plans, Indexes, Transactions, In-Memory OLTP
Highest Rated
Rating: 4.5 out of 5(845 ratings)
4,708 students

T-SQL Execution Plans, Indexes, Transactions, In-Memory OLTP

Learn Execution Plans, Indexes, Transactions, Isolation Levels & In-Memory OLTP using T-SQL in Microsoft SQL Server
Created byVikas Munjal
Last updated 1/2026
English
Bulgarian [Auto],Greek [Auto],

What you'll learn

  • Understand how SQL Server stores and accesses data using pages, extents, heaps, and indexes
  • Design and maintain effective indexing strategies using clustered and nonclustered indexes
  • Identify performance issues using execution plan operators, warnings, and indicators
  • Tune queries by recognizing common execution plan patterns and anti-patterns
  • Understand transactions and concurrency behavior in SQL Server
  • Identify and resolve concurrency problems such as dirty reads, phantom reads, and deadlocks
  • Choose the correct transaction isolation level based on real-world scenarios
  • Understand and implement In-Memory OLTP, including tables, indexes, and native compiled procedures

Course content

9 sections79 lectures9h 0m total length
  • Introduction4:51
  • Page in SQL Server3:17

    Explore how SQL Server stores table data on 8 kb pages, using a page header and row offsets to organize records within 8060 bytes after the header.

  • Extent in SQL Server4:12

    Explain how SQL Server uses extents to store eight pages per extent, with mixed extents holding the first eight pages and uniform extents containing pages from the same table.

  • Heap in SQL Server5:22

    Explore how SQL Server stores a table as a heap with pages and extents, why heap scans are slow, and how a clustered index sorts data to improve performance.

  • Clustered Index8:46

    Learn how a clustered index on the ID column forms a B-tree with sorted leaves, enabling index seek, while searches on other columns cause index scans or heap scans.

  • Non Clustered Index5:34

    Create a non-clustered index on the name column to enable indexed seeks, then use the clustered index on id to retrieve full rows, delivering fast query performance without full scans.

  • Heap with Non Clustered Index3:33

    Explore how a non-clustered index on a heap with no clustered index uses row addresses to locate records, showing leaf pointers and handling duplicates like Gary.

  • Indexes are not very Deep2:39

    Learn why SQL Server indexes are not very deep, with a multi-branch B-tree where root, intermediate, and leaf pages hold many value ranges for efficient lookups, especially for clustered indexes.

  • Composite Index Part 17:00

    this lecture explains composite non-clustered indexes on last name and first name, how data is sorted at the leaf level, and why leading column order affects query use.

  • Composite Index Part 21:46

    Demonstrates creating a composite index on order date descending and name ascending so the select returns already sorted results without the need for an order by.

  • Index Fragmentation8:45

    Explore index fragmentation in sql server, where logical order diverges from physical leaf-page order, creating out-of-sequence pages that slow range scans and are reduced by rebuilding or reorganizing the index.

  • More on Fragmentation2:45

    Explore how inserts cause fragmentation on pages in sorted data, and how updates that increase record size force page reflow; deletes mark rows as deleted rather than physically removing them.

  • Please download Demonstration Scripts0:02
  • Index Creation using T-SQL Commands13:27

    Understand how clustered and non-clustered indexes work in SQL Server. Learn to create indexes with T-SQL, including primary keys, and determine impacts on insert, update, delete performance and fragmentation.

  • Index Rebuild and ReOrganize2:58

    Defragment using index rebuild or reorganize. Online rebuild is available in Enterprise Edition; thresholds: >30% rebuild, 10–30% reorganize, <10% do not touch.

  • Index Fragmentation Practical12:11

    Learn how index fragmentation emerges from bulk inserts and updates in a sample customer table, measure it with dm_db_index_physical_stats, and rebuild the clustered index online to reduce fragmentation.

  • FillFactor5:26

    Learn how the fill factor delays fragmentation by filling leaf pages to 90%, reducing new page creation, and enabling off-peak rebuilds, with testing from 95% down to 80% not below.

  • T-SQL Command to introduce FillFactor in an Index0:24
  • Included Columns5:42

    Included columns exist only in non-clustered indexes, storing fields at leaf level to speed name-based queries. Avoid too many included columns, as it increases index size and can slow updates.

  • Data Type on Clustered Index6:13

    Prefer integer types for the clustered index, and consider date or date time for range scans; avoid clustering on varchar or char due to fragmentation and slower joins.

Requirements

  • RDBMS concepts should be known & should have good hands-on on T-SQL Commands
  • Microsoft SQL Server and SQL Server Management Studio should be installed already

Description

This course is not for beginners. One should have prior knowledge on T-SQL commands before enrolling into this course.The course contains the following topics

Index Concepts in SQL Server

Page in SQL Server

Extent in SQL Server

Heap in SQL Server

Clustered Index

Non Clustered Index

Heap with Non Clustered Index

Indexes are not very Deep

Composite Index

Index Fragmentation

Index Creation using T-SQL Commands

Index Rebuild and ReOrganize

FillFactor

Included Columns

Data Type on Clustered Index


Execution Plan

Statistics

Actual Execution Plan

Estimated Execution Plan


Common Operators

Table Scan

Index Scan

Index Seek

Key Lookup

RowID Lookup

Nested Loop

Sort

Merge Join

Hash Join

Compute Scalar

Stream Aggregate

Hash Aggregate

Left Semi Join

Right Semi Join

Left Anti Semi Join

Right Anti Semi Join

Segment

Sequence Project

Lazy Spool

Eager Spool

Parallelism - Distribute Stream ,Gather Stream & Repartition Stream


More on Execution Plans

Halloween Problem

Execution Plan of Insert Operation

Execution Plan of Delete Operation

Execution Plan of Update Operation

Subtree cost related to Parallelism

Subtree Cost of Stream and Hash Aggregate

Index supports Wild Card


Patterns to Note to Tune Queries

Parameter Sniffing

Parameter Sensitive Plan Optimization in Sql Server 2022

MergeJoin Patterns

Hash Join Patterns

Key Lookup Patterns

Sort Indicators

Aggregate Indicators

Parallelism Indicators

Warnings in Execution Plan


From these topocs you will learn how to read and understand execution plans which will help in tuning Transact SQL Commands


Later sections of the online video training course include topics related to Transactions , Concurrency Problems , their solutions using Transaction Isolation Levels . Another major portion of the course consists of In-Memory OLTP in T-SQL .

The details topics are


Transactions


Auto Commit  Transactions

Implicit  Transactions

Explicit Transactions

Deadlock

Lock Modes


Concurrency Problems


Dirty Read Problem

Non Repeatable Read Problem

Phantom Read Problem

Lost Update Problem


Isolation Levels and Solutions


Read Uncommitted Isolation Level

Read Committed Isolation Level

Repeatable Read Isolation Level

Serializable Isolation Level

Scenario where Repeatable Read or Serializable or Snapshot can be used

Snapshot Isolation Level

Read Committed Snapshot Isolation Level


In-Memory OLTP


What are In-memory Tables

Scenarios of In-memory Table

Creating In-memory Table and Testing its performance

In-memory Table Indexes

Native Compiled Stored Procedure

Migration from Existing Disk Based Tables to In-memory Table


In-Memory OLTP Isolation Levels


In-Memory OLTP Snapshot Isolation Level

In-Memory OLTP Repeatable Read Isolation Level

In-Memory OLTP Serializable Isolation Level


Who this course is for:

  • The partitcipants who have prior knowledge of T-SQL commands.
  • This course is for SQL Server Developers , SQL Server DBAs, .NET Developers who writes T-SQL Commands , Data Analysts etc.