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 nearly empty grain bin with a scoop in a barn, a field of ripening wheat seen through the open door

Finding Oversized Data Files With Lots of Free Space

March 8, 2023
Pinal Dave
SQL Tips and Tricks
DBA, Disk, Shrinking Database, SQL Data Storage

Identify oversized data files with FILEPROPERTY, separate internal free space from disk capacity, and review one-time shrink choices.

Read More
Gouache painting of a bead tray with tiny cells beside a tray of four large compartments, one vermilion

VLF Growth Rules: How Many Virtual Log Files One Growth Adds

February 28, 2023
Pinal Dave
SQL Tips and Tricks
SQL Server 2022, Transaction Log, VLF

The VLF growth rules say how many virtual log files one log growth adds: one up to 64 MB, eight up to 1 GB, sixteen above. This post measures them on a demo database, shows a log with 68 VLFs from 1 MB steps, and repairs it by shrinking and growing once.

Read More
Gouache painting of a ready blank canvas on an easel beside a primed canvas and a pot of vermilion paint

Log File Growth and Instant File Initialization: The 64 MB Rule

February 24, 2023
Pinal Dave
SQL Tips and Tricks
Disk, SQL Server 2022, SQL Server Configuration, Transaction Log

The 64 MB rule says log file growth can skip zeroing when instant file initialization is on, but only up to 64 MB. Two trace flags make the SQL Server error log show a 64 MB growth skipping the zeroing and a 65 MB growth zeroing in full. The last section says what to change.

Read More
A sash window latch selecting one pane within a larger window frame

statement_start_offset: Showing the Exact Statement Running Now

February 10, 2023
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL Performance, SQL Server

A stored procedure runs for forty minutes and you need the busy line. Here is how to pull it out of the batch text without the usual off-by-two mistakes.

Read More
linenumber

SQL Server: How to Display Row Numbers in Query Editor for Efficient Query Editing

February 2, 2023
Pinal Dave
SQL Tips and Tricks
SQL Server, SQL Server Management Studio

Let us learn how to Display Row Numbers in Query Editor for Efficient Query Editing. Comprehensive Database Performance Health Check

Read More
Gouache painting of a long pegboard on a table with pliers, a saw, two vermilion-handled hammers, one set crosswise out of line

Performance Tuning Mistakes in SQL Server: 11 Habits to Fix

February 1, 2023
Pinal Dave
SQL Performance
Best Practices, SQL Backup and Restore, SQL Cursor, SQL Index, SQL Statistics

Performance tuning mistakes are habits, and each one has a check. Eleven sit in one table, and five are measured on a demo database: a missing index, stale statistics, a row by row loop, a giant delete and a type that cannot be indexed.

Read More
An electrotype mold kept separately beside an impression made from it

Updatable Ledger Tables: Proving No One Quietly Changed a Row

January 25, 2023
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL Performance, SQL Server

Update a row in a ledger table and the old version stays. Then verify the history with a digest, and break the digest to see what failure looks like.

Read More
Two frying pans on a stove, butter sizzling in the hot one and sitting solid in the cold one.

Cold Cache vs Warm Cache: Testing Query Speed Fairly

January 9, 2023
Pinal Dave
SQL Performance
SQL Cache, SQL Memory, SQL Performance, SQL Server, Testing

Compare cold cache and warm cache query tests using isolated buffer clearing, logical and physical reads, and controlled measurements.

Read More
A milking pail with two portions of fresh milk added beside a larger retained total

Turning Per-Second Counters Into Real Rates From DMVs

December 13, 2022
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL Performance, SQL Server

That per-second counter on your dashboard is probably a running total. Here is how to turn it into a real rate with two samples.

Read More
A hand testing eggs through a wooden sizing ring before packing them, two oversized eggs set aside in a red bowl.

TRY_CAST vs CAST: Finding Rows That Will Not Convert Before a Load

December 7, 2022
Pinal Dave
SQL Tips and Tricks
ETL, SQL Datatype, SQL DateTime, SQL Function, SQL Server

Find text values that will not convert before loading, separate invalid and missing input, and use explicit date styles and culture parsing.

Read More
Previous 1 … 27 28 29 30 31 32 33 … 590 Next
  • Books
  • Testimonials
  • Privacy Policy

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