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
A sloping egg rack at a market stall, one hand taking the oldest egg from the front, another adding a fresh one.

DELETE TOP With ORDER BY: Removing the Oldest Rows First

May 1, 2024
Pinal Dave
SQL Tips and Tricks
CTE, SQL Delete, SQL Order By, SQL Server, SQL Top

Use DELETE TOP safely through an ordered CTE, preview oldest rows, apply a supporting index, and remove eligible rows in bounded batches.

Read More
drop statement

Multi Tables – 1 Drop Statement – SQL in Sixty Seconds #134

October 16, 2020
Pinal Dave
SQL Video
SQL Delete, SQL in Sixty Seconds, SQL Scripts, SQL Server

It was taking time as well as require to write them one at a time. In today’s blog post we will see how we can drop multiple tables with a 1 drop statement. 

Read More
delete

Remove Trigger for Delete – SQL in Sixty Seconds #133

October 13, 2020
Pinal Dave
SQL Video
Output Clause, SQL Delete, SQL in Sixty Seconds, SQL Scripts, SQL Server, SQL Trigger

I am involved in the Comprehensive Database Performance Health Check. Today we will discuss how we can remove triggers for the Delete statement. 

Read More
Deleted Rows

How to Capture Deleted Rows Without Trigger? – Interview Question of the Week #297

October 11, 2020
Pinal Dave
SQL Interview Questions and Answers
SQL Delete, SQL Performance, SQL Scripts, SQL Server, SQL Trigger

Question: How to Capture Deleted Rows Without Trigger?
Answer: I was recently asked by my client during the Comprehensive Database Performance Health Check.

Read More
delete statement

SQL SERVER – Delete Statement and Index Usage

September 17, 2020
Pinal Dave
SQL Performance
SQL Delete, SQL Index, SQL Scripts, SQL Server

The client wanted to know if the index help with the DELETE command as well. The answer is yes, Indexes do help with the DELETE statement.

Read More
A library trolley carrying a small stack of old books toward a basement stairway, a gap left on the shelf.

Archiving Old Rows to a History Table in Small Batches

February 3, 2020
Pinal Dave
SQL Tips and Tricks
Batch, Output Clause, SQL Delete, SQL Server, SQL Transactions

Make archiving old rows atomic with DELETE OUTPUT, preserved source identifiers, bounded batches, reconciliation, and a job time limit.

Read More
A small red boat ferrying a few crates at a time from a big heap on one quay to a pile across the water

Deleting Millions of Rows in Batches Without Filling the Log

August 9, 2016
Pinal Dave
SQL Performance
Batch, SQL Delete, SQL Server, Transaction Log

Plan deleting millions of rows with bounded commits, an indexed cutoff, log reuse checks, and a clear choice of retention method.

Read More
1 2 Next
  • Books
  • Testimonials
  • Privacy Policy

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