This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
Gouache painting of a short straight path and a long winding path leading to the same vermilion gate

IIF in SQL Server: IF THEN Logic Compared With CASE

December 24, 2018
Pinal Dave
SQL Tips and Tricks
Execution Plan, SQL CASE, SQL Function, SQL Scripts

IIF in SQL Server is a short way to write IF THEN logic with two outcomes. This post compares it with CASE in a small juice shop table, shows that both produce the same plan, and covers NULL, data types and the WHERE clause.

Read More
A laden plum tree with a tiny bowl at its foot and a large red crate beside it.

Multi-Statement Table-Valued Functions and Interleaved Execution

November 21, 2018
Pinal Dave
SQL Performance
Execution Plan, SQL Function, SQL Performance, SQL Server 2017

See how interleaved execution corrects estimates for multi-statement table-valued functions and when an inline rewrite wins.

Read More
SQL SERVER - Optimize Key Lookup by Creating Index with Include Columns

SQL SERVER – Optimize Key Lookup by Creating Index with Include Columns

November 17, 2018
Pinal Dave
SQL Tips and Tricks
Execution Plan, SQL Index, SQL Operator, SQL Scripts, SQL Server

A query slowed to over 10 minutes because of a big key lookup. Here is how I optimize key lookup operations by creating an index with include columns.

Read More
Two shoe racks with the same shoes, red pairs grouped on one and scattered on the other.

Multi-Column Index Key Order: Which Column Goes First

November 13, 2018
Pinal Dave
SQL Performance
Execution Plan, SQL Index, SQL Performance, SQL Server

Test index key order with equality, range, and OR predicates, then use seek predicates and logical reads to choose the lead column.

Read More
Graduated plates stand in two racks in opposite size orders

Does Sort Order in Index Column Matters for Performance? – Interview Question of the Week #199

November 11, 2018
Pinal Dave
SQL Interview Questions and Answers
Execution Plan, SQL Index, SQL Performance, SQL Server, SQL Statistics

Does the sort order in an index column matter for performance? Yes, in some specific scenarios, and here is an example from a recent Health Check question.

Read More
Fresh bakery trays are ready on a rack before the counter needs them

What is Read Ahead Read in SQL Server? – Interview Question of the Week #197

October 28, 2018
Pinal Dave
SQL Interview Questions and Answers
Execution Plan, SQL Memory, SQL Performance, SQL Scripts, SQL Server

Question: What is Read Ahead Read in SQL Server?

Answer: This is SQL Server’s feature which brings data pages into the buffer cache.

Read More
A hand washing with a thin worn sliver of soap while a new red bar dries on the windowsill.

Asynchronous Statistics Updates: When They Help and When They Hurt

September 27, 2018
Pinal Dave
SQL Performance
Execution Plan, SQL Performance, SQL Server, SQL Statistics

Evaluate asynchronous statistics updates against compile latency, data-change timing, and low-priority metadata locking in SQL Server.

Read More
Previous 1 … 18 19 20 21 22 23 24 … 35 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com