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
Marbles tipped from a neat row into a bowl, landing mixed

Why a Clustered Index Does Not Guarantee Order Without ORDER BY

March 19, 2012
Pinal Dave
SQL Tips and Tricks
Clustered Index, Execution Plan, SQL Order By, SQL Server

Explain order without ORDER BY through parallel scans, NOLOCK allocation scans, alternate indexes, shared scans, and the explicit sort fix.

Read More
A graph plotting data points on a coordinate grid.

Shortest Distance Between Two Shapes in SQL Server: Ramsetu or Adam’s Bridge

March 18, 2012
Pinal Dave
SQL Tips and Tricks
Spatial Database, SQL Function, SQL Scripts, SQL Server

The shortest distance between two shapes in SQL Server comes from ShortestLineTo and STDistance. The tests here show the numbers behind the three original pictures, what happens when shapes overlap or use different SRIDs, and the same method on the globe near Ramsetu.

Read More
An angler casting two lines into two pools, one red float bobbing

MultiSubnetFailover: Why Clients Time Out After an AG Failover

March 17, 2012
Pinal Dave
SQL Tips and Tricks
AlwaysOn, SQL Connection, SQL High Availability, SQL Server

Diagnose an AG failover timeout with listener DNS, MultiSubnetFailover, RegisterAllProvidersIP, HostRecordTTL, and client-driver checks.

Read More
An egg slicer lowers parallel wires through one egg beside individually cut egg slices

Replacing a Running Total Cursor With a Window Function

March 16, 2012
Pinal Dave
SQL Tips and Tricks
SQL Cursor, SQL Function, SQL Order By, Temp Table

That loop adding to a variable can usually become one window function. Here is the proof that the balances match, and the tie trap to watch for.

Read More
A hand taps a whole watermelon at a market stall, with an unused knife on the counter

Reading a Backup File Before You Restore With RESTORE HEADERONLY

March 15, 2012
Pinal Dave
SQL Tips and Tricks
Compression, DBA, SQL Backup and Restore, SQL Server

Use RESTORE HEADERONLY to identify backup sets, source versions and finish dates before selecting a restore and checking the media.

Read More
Gouache painting of scattered paper cards leading to a neatly indexed wooden drawer with a red divider.

SQL Server Indexing Basics: SQL in Sixty Seconds #006

March 14, 2012
Pinal Dave
SQL Video
Execution Plan, SQL in Sixty Seconds, SQL Index, SQL Performance

SQL Server indexing basics start with the query you want to help. The tests here use a 200,000 row table to compare a scan, a plain index and a covering index, show when SQL Server ignores an index, and measure what three extra indexes cost on an insert.

Read More
Crossed pull cords immobilize the slats of a single Venetian blind

Intra-Query Parallel Deadlock: When One Query Blocks Itself

March 13, 2012
Pinal Dave
SQL Performance
Deadlock, MAXDOP, Parallel, SQL Extended Events

No error, no deadlock graph, just a report that is slow on some runs. Here is a demo where one query deadlocks with itself, and how to fix it.

Read More
Previous 1 … 546 547 548 549 550 551 552 … 844 Next
  • Books
  • Testimonials
  • Privacy Policy

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