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- IF EXISTS(Select null from table) vs IF EXISTS(Select 1 from table)

SQL SERVER- IF EXISTS(Select null from table) vs IF EXISTS(Select 1 from table)

February 21, 2010
Pinal Dave
SQL Puzzle
Best Practices, SQL Scripts

Is IF EXISTS(Select null from table) faster than IF EXISTS(Select 1 from table)? A great comment thread by Divya, Brian and Marko answers it.

Read More
SQL SERVER - Recompile Stored Procedure at Run Time

SQL SERVER – Recompile Stored Procedure at Run Time

February 20, 2010
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Stored Procedure

Two ways to recompile a stored procedure at run time in SQL Server: add WITH RECOMPILE when you create it, or ask for a one-time recompile.

Read More
Hands fitting old wooden drawers into a new cabinet, one drawer too wide to slide into its opening

Mapping MySQL Data Types to SQL Server

February 19, 2010
Pinal Dave
SQL Tips and Tricks
MySQL, SQL Datatype, SQL DateTime, SQL Migration, SQL Server

Mapping MySQL data types requires checking signed ranges, text encoding, date limits, and application behavior before choosing SQL Server columns.

Read More
SQL SERVER - Plan Recompilation and Reduce Recompilation - Performance Tuning

SQL SERVER – Plan Recompilation and Reduce Recompilation – Performance Tuning

February 18, 2010
Pinal Dave
SQL Performance
SQL Index, SQL Scripts, SQL Stored Procedure, SQL System Table

Plan recompilation hurts performance just like a first compile. Learn what causes it, from schema changes to SET options, and how to reduce recompilation.

Read More
A dump truck tipping a whole load of gravel onto a driveway at once

Minimal Logging for Bulk Loads

February 17, 2010
Pinal Dave
SQL Tips and Tricks
CSV, SQL Backup and Restore, SQL Log, SQL Server, Transaction Log

Minimal logging for Bulk Loads depends on recovery model, table shape, and locking; learn the prerequisites, tradeoffs, and how to verify a load.

Read More
Gouache painting of a row of prepared ingredient bowls beside an empty mixing bowl with a red whisk across it

Stored Procedure Optimization Tips That Still Matter

February 16, 2010
Pinal Dave
SQL Performance
Best Practices, SQL Coding Standards, SQL Stored Procedure

Stored Procedure Optimization comes down to a short list of habits you can test on your own server. This post builds one badly written procedure and one good one on a small orders table, then measures the difference in logical reads. It also covers parameter sniffing, the sp_ prefix, short transactions and error handling.

Read More
SQL SERVER - Difference Between Update Lock and Exclusive Lock

SQL SERVER – Difference Between Update Lock and Exclusive Lock

February 15, 2010
Pinal Dave
SQL Interview Questions and Answers
SQL Lock

What is the difference between Update Lock and Exclusive Lock? An Update Lock can sit on a row that has a Shared Lock, then turns Exclusive when it writes.

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

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