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
SQL SERVER - 2005 - Find Index Fragmentation Details - Slow Index Performance

SQL SERVER – 2005 – Find Index Fragmentation Details – Slow Index Performance

March 27, 2008
Pinal Dave
SQL Tips and Tricks
SQL Index, SQL Scripts, SQL System Table

A slow index turned out to be heavily fragmented. My quick script uses sys.dm_db_index_physical_stats to show index fragmentation details for every index.

Read More
A muddy boot print on a clean stone doorstep with a brass magnifying glass resting beside it.

Reading SQL Server Error Messages Carefully

March 26, 2008
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL Error Messages, SQL Server, SQL Transactions

Reading SQL Server error messages carefully means using number, severity, state, and line to narrow the cause before searching.

Read More
SQL SERVER - Simple Puzzle Using Union and Union All - Answer

SQL SERVER – Simple Puzzle Using Union and Union All – Answer

March 25, 2008
Pinal Dave
SQL Puzzle
Database, SQL Joins, SQL Scripts

The answer to yesterday’s Simple Puzzle Using Union and Union All, explained with an image. My UNION vs. UNION ALL article explains why it works.

Read More
SQL SERVER - Simple Puzzle Using Union and Union All

SQL SERVER – Simple Puzzle Using Union and Union All

March 24, 2008
Pinal Dave
SQL Puzzle
SQL Scripts, SQL Utility

A simple puzzle using UNION and UNION ALL: guess the output of two short scripts before you run them. The hint is my article on UNION vs. UNION ALL.

Read More
SQL SERVER - 2005 - Mechanisms to Ensure Integrity and Consistency of Databases - Locking and Row Versioning

SQL SERVER – 2005 – Mechanisms to Ensure Integrity and Consistency of Databases – Locking and Row Versioning

March 23, 2008
Pinal Dave
SQL Performance
Database, SQL Lock

Books Online describes two mechanisms to ensure integrity and consistency of databases: locking and row versioning. Here is how it defines each one.

Read More
SQL SERVER - 2005 - Find Highest / Most Used Stored Procedure

SQL SERVER – 2005 – Find Highest / Most Used Stored Procedure

March 22, 2008
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Stored Procedure, SQL System Table

Which stored procedure runs most often? My small SQL Server 2005 script finds the most used stored procedure, with execution count, worker time and calls per second.

Read More
SQL SERVER - Introduction to Live Lock - What is Live Lock?

SQL SERVER – Introduction to Live Lock – What is Live Lock?

March 21, 2008
Pinal Dave
SQL Tips and Tricks
Software Development, SQL Lock

What is Live Lock in SQL Server? How a write request can keep waiting behind a stream of reads, how it differs from a deadlock and how to reduce it.

Read More
Socks sorted into matched pairs on a quilt, a small pile of odd socks set apart, a hand holding up one sock.

Solving SQL Puzzles With Set-Based Thinking

March 20, 2008
Pinal Dave
SQL Puzzle
Ranking Functions, SQL Joins, SQL Scripts, SQL Server

Set-based thinking solves three SQL puzzles with grouping, anti-joins, and windows, then turns each solution into a repeatable query habit.

Read More
SQL SERVER - Add Column With Default Column Constraint to Table

SQL SERVER – Add Column With Default Column Constraint to Table

March 19, 2008
Pinal Dave
SQL Tips and Tricks
SQL Coding Standards, SQL Constraint and Keys, SQL Scripts, SQL Server

Add a NOT NULL column with a named default Column Constraint in one ALTER TABLE statement. I always name constraints instead of letting SQL Server pick one.

Read More
Gouache painting: beside it, the same ring hovers above an empty saucer and closes on nothing, so no match is made

Simple CASE and NULL: Use a Searched Condition

March 18, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL String

Simple CASE and NULL do not match through equality. Use a searched IS NULL branch, preserve empty text, and make the result type explicit.

Read More
Previous 1 … 536 537 538 539 540 541 542 … 590 Next
  • Books
  • Testimonials
  • Privacy Policy

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