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
Ink spot illustration of an opened letter lying flat with a brass letter opener across one corner and a glass inkwell beside it.

The SQL Advisor: Seven Answers, All Measured

October 19, 2026
Pinal Dave
SQL Tips and Tricks
Best Practices, Database, Developer, SQL Server

The SQL Advisor answers seven letters with measurements instead of opinions. Table variables, what each index costs on insert, shrinking after a big delete, SELECT star, ORDER BY in a view, heaps, and whether the order of your WHERE predicates matters.

Read More
Painted illustration of an empty meeting room, chairs pushed back from the table, one glowing laptop and a cold cup of coffee, with an old sprint plan still on the whiteboard and DO NOT ERASE written in the corner.

Tribal Knowledge: Nobody Left to Ask

October 12, 2026
Pinal Dave
AI
AI, Best Practices, Database, Developer

Tribal knowledge is the part of the job nobody writes down, and it leaves when the person leaves. I sat with a team that could not tell me whether they were allowed to change four lines of billing code. The assistant at the end of the table had read every line and could not say why those lines were there.

Read More
Painting of five identical filing cabinets floating in dark space. Four are cold and sealed, one glows from a half-open drawer, and a brass plaque in front reads WHICH ONE IS REAL.

Text to SQL: The SQL Was Never the Hard Part

October 9, 2026
Pinal Dave
AI
AI, Best Practices, Database, Developer

Text to SQL works now, on real schemas, with joins and window functions. I watched three companies hand it to their business users, and all three quietly stopped. The SQL was never the hard part. The hard part is knowing which table is real and which meaning of the word you meant.

Read More
Cardinal Rules, a three panel cartoon by SQLAuthority. Sam asks the red bird for last quarter revenue. The bird types in a blur and calls the query poetry. Sam says there is no table called Revenue Final, and the bird replies that there should be.

AI Hallucinated a Table That Was Never There

September 26, 2026
Pinal Dave
AI
AI, Database, DBA, SQL Humor

AI hallucinated a table, wrote a lovely query against it, and handed the whole thing over without blinking. Say hello to Cardinal.

Read More
Diagram titled One row, one DELETE, five places it still lives. The left panel lists the row alive: a 284 byte log record before the commit, an address at 1 colon 392 colon 0, a checkpoint writing the page, and a backup copying it out. The right panel lists what remains after the delete: the ghost record still 184 bytes, log records, the statistics histogram that names the row, deallocated pages, and every backup.

The Migration of a Row: Tagged, Followed, Found Again

September 21, 2026
Pinal Dave
SQL Tips and Tricks
Best Practices, Database, Developer, SQL Server

I followed the migration of a row through SQL Server 2025, from the first write to the grave. The log gets there before the table. The delete does not erase anything. And when the table is empty and the ghost is gone, the statistics histogram still names the row in full.

Read More
Mixed wooden pieces in one shallow bowl beside three small bowls containing sorted matching pieces.

Normalisation in Plain Words, and When to Stop

February 24, 2021
Pinal Dave
SQL Tips and Tricks
Best Practices, Database, SQL Scripts, SQL Server

Understand normalisation through one order example, then decide when a reporting copy is worth the cost of keeping duplicated data consistent.

Read More
Gouache painting of a wooden card catalog cabinet beside woven baskets of mixed items, linked by a vermilion string.

SQL to MongoDB: Mapping SELECT, WHERE, GROUP BY and JOIN

May 23, 2020
Pinal Dave
SQL Tips and Tricks
Database, MongoDB, NoSQL, SQL Scripts

Moving from SQL to MongoDB is mostly a change of vocabulary plus a new way to join. This post maps SELECT, WHERE, ORDER BY, GROUP BY and JOIN to find, sort, $group and $lookup, and tests each one on a small vegetarian shop.

Read More
1 2 3 4 … 52 Next
  • Books
  • Testimonials
  • Privacy Policy

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