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
Gouache painting of a big unrolled quilt beside a small tightly rolled one tied with a vermilion band

Estimate Compression Savings for Every Table in a Database

December 15, 2021
Pinal Dave
SQL Tips and Tricks
Compression, SQL Scripts, SQL Stored Procedure

To estimate compression savings for every table, loop over the database and call sp_estimate_data_compression_savings with ROW and PAGE. This post ranks tables by space saved and checks one estimate against a real rebuild.

Read More
Gouache painting: three stands at a dairy loading dock

Scalar Subqueries: An Empty Input Produces NULL

December 6, 2021
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL Scripts, SQL Server

Scalar subqueries contribute one value to an outer row. Keep row absence separate from a present NULL and enforce the at-most-one-row contract.

Read More
Gouache painting of a lemonade stand with a ready vermilion pitcher beside untouched lemons and a squeezer

Cached Plan Reuse: How to Tell if a Query Used a Cached Plan

December 2, 2021
Pinal Dave
SQL Tips and Tricks
Execution Plan, SQL Cache, SQL Scripts

Cached plan reuse is invisible in a result set. This post shows three checks on SQL Server: the compiled and runtime parameter values in the plan, the usecounts column of the plan cache, and the plan creation time.

Read More
Gouache painting of a courtyard wall with three open blue-grey doors, each with a small vermilion key in its lock

Login Database Access: List the Databases a Login Can Open

November 26, 2021
Pinal Dave
SQL Tips and Tricks
SQL Login, SQL Scripts, SQL Server Security

Check login database access by matching the login SID against the users of every online database. One query shows the user, the CONNECT state and the guest back door, and it needs no impersonation.

Read More
current time zone

Get Current Time Zone – SQL in Sixty Seconds #187

November 23, 2021
Pinal Dave
SQL Video
SQL DateTime, SQL in Sixty Seconds, SQL Scripts, SQL Server

Lots of people often ask me how to get the current time zone in SQL Server when I am working on Comprehensive Database Performance Health Check.

Read More
memory pressure

Detecting Memory Pressure – SQL in Sixty Seconds #186

November 17, 2021
Pinal Dave
SQL Video
SQL in Sixty Seconds, SQL Memory, SQL Scripts, SQL Server

After my video on CPU running 100%, many of you asked for one on memory. Here is my SQL in Sixty Seconds video on detecting memory pressure.

Read More
A vessel rests for a deliberate interval while its tools remain available nearby.

MySQL – Wait For Seconds Using SELECT SLEEP()

November 15, 2021
Pinal Dave
SQL Tips and Tricks
MySQL, SQL Scripts

For a WAIT FOR test in MySQL, I use SLEEP with a bounded delay. A customer asked for the corresponding command.

Read More
Previous 1 2 3 4 5 6 7 … 365 Next
  • Books
  • Testimonials
  • Privacy Policy

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