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: three wooden stands in a meadow

EXISTS: A Row Containing NULL Still Exists

February 17, 2011
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL Scripts, SQL Server

EXISTS answers whether qualifying rows exist. Keep missing values separate from missing rows and preserve the intended correlation.

Read More
Glass bottles on a windowsill arranged tallest to shortest, one short vermilion bottle out of place in the middle.

Sorting Correctly: Collation and ORDER BY

February 10, 2011
Pinal Dave
SQL Tips and Tricks
SQL Collation, SQL NULL, SQL Order By, SQL Server

Collation and ORDER BY decide case, accent, and text-number order; choose rules explicitly when one report needs different sorting.

Read More
Gouache painting: two identical toy trains with red engines and blue carriages standing on one wooden track

Text Equality: Trailing Spaces Can Compare as Equal

January 28, 2011
Pinal Dave
SQL Tips and Tricks
SQL Collation, SQL Datatype, SQL Server

Text equality can match different stored strings. Check byte length and complete representation when exact identity belongs to the contract.

Read More
A receiving trough distributes small pieces through several separate channels into independent trays.

SQL SERVER – Reducing Page Contention on TempDB

January 26, 2011
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL TempDB

Page Contention on TempDB needs an identified allocation wait and server version. I check both before recommending legacy trace flags.

Read More
A child seen from behind against a door frame with pencil height lines, an adult hand marking a new higher line.

Slowly Changing Dimensions in Plain T-SQL

January 23, 2011
Pinal Dave
SQL Tips and Tricks
Business Intelligence, Data Warehousing, ETL, SQL Server

Slowly changing dimensions need explicit Type 1 and Type 2 rules; use T-SQL updates and inserts with tests for history and overlap.

Read More
A bakery counter where cooled loaves are sold from the shelf while a fresh tray cools on a rack behind the counter.

Loading a Fact Table Without Blocking Reports

January 20, 2011
Pinal Dave
SQL Tips and Tricks
Data Warehousing, ETL, SQL Lock, SQL Server, Table Partitioning

Loading a fact table without blocking reports calls for isolated staging, aligned partition switching, short locks, and a tested reader path.

Read More
SQL SERVER - Shrinking Database is Bad - Increases Fragmentation - Reduces Performance

SQL SERVER – Shrinking Database is Bad – Increases Fragmentation – Reduces Performance

January 19, 2011
Pinal Dave
SQL Performance
SQL Index, SQL Scripts, SQL Server, SQL Server DBCC

Shrinking database is bad: it increases fragmentation and reduces performance. Here is a simple example with two tables that shows it step by step.

Read More
Previous 1 … 321 322 323 324 325 326 327 … 416 Next
  • Books
  • Testimonials
  • Privacy Policy

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