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
Index Used

Identify Index Used for Query – SQL in Sixty Seconds #088

July 17, 2020
Pinal Dave
SQL Video
SQL in Sixty Seconds, SQL Index, SQL Performance, SQL Scripts, SQL Server

How do you identify index used for query? It is a popular question in my health checks, and this SQL in Sixty Seconds video shows the easy way.

Read More
Gouache painting of a wheelbarrow with vermilion handles carrying a basket of fruit down an orchard row of pear trees

Multiple Aggregates in One Query: Read the Table Once

June 20, 2020
Pinal Dave
SQL Performance
SQL Index, SQL Performance, SQL Scripts

Multiple aggregates in one query read a table once, where separate subqueries read it again and again. This post measures the logical reads of two subqueries against one SELECT, uses CASE inside SUM for different filters, and shows two cases where the rewrite gains nothing or loses to an index.

Read More
A fixed rail guides a cart along a winding route despite a shorter path

How to Force Index on a SQL Server Query? – Interview Question of the Week #281

June 14, 2020
Pinal Dave
SQL Interview Questions and Answers
Clustered Index, Query Hint, SQL Index, SQL Scripts, SQL Server

Question: How to Force Index on a SQL Server Query?
Answer: I personally do not like to force an index on any query. Let us learn together.

Read More
A woven panel and a complete replacement with an additional stripe

How to Alter Index to Add New Columns in SQL Server? – Interview Question of the Week #278

May 24, 2020
Pinal Dave
SQL Interview Questions and Answers
SQL Index, SQL Performance, SQL Scripts, SQL Server

Question: How to Alter Index to Add New Columns in SQL Server? 

Answer: It is not possible to Alter Index definition to add or remove columns.

Read More
A front door with two identical brass doorbells, one polished and gleaming, the other dull with a small cobweb.

Duplicate Statistics: Auto-Created Stats That Shadow Index Statistics

April 16, 2020
Pinal Dave
SQL Performance
DBA, SQL Index, SQL Server, SQL Statistics

Find duplicate statistics on index-leading columns, compare freshness and sampling, and generate cautious DROP STATISTICS candidates.

Read More
Gouache painting of a small chest with one vermilion drawer open beside a pile of wooden planks

Rebuild All Indexes on a Table in SQL Server: SSMS and T-SQL

April 7, 2020
Pinal Dave
SQL Performance
SQL Index, SQL Performance, SQL Scripts, SQL Server Management Studio

To rebuild all indexes on a table, right-click the Indexes folder in SSMS and choose Rebuild All, or run ALTER INDEX ALL with REBUILD. This post checks fragmentation first, rebuilds a demo table and shows what the command does to a disabled index. It also compares REBUILD with REORGANIZE and the options that matter.

Read More
Several intact gears sit in a fitted case beside separate maintenance and inspection tools.

SQL SERVER Management Studio – Rebuild All Indexes on Table

March 6, 2020
Pinal Dave
SQL Tips and Tricks
SQL Index, SQL Scripts, SQL Server, SQL Server Management Studio

SSMS can open a Rebuild All dialog for table indexes. An e-commerce customer discovered this shortcut during my health check.

Read More
Previous 1 … 10 11 12 13 14 15 16 … 64 Next
  • Books
  • Testimonials
  • Privacy Policy

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