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 - Optimization Rules of Thumb - Best Practices

SQL SERVER – Optimization Rules of Thumb – Best Practices

April 25, 2008
Pinal Dave
SQL Performance
Best Practices, SQL Index

My optimization rules of thumb for a slow running query: read the query plan first, turn scans into seeks, fix bookmark lookups with a covering index and more.

Read More
A hand lifting the cap of a brass speaking tube that runs to a far room

Using Synonyms to Simplify Cross-Database Queries

April 25, 2008
Pinal Dave
SQL Tips and Tricks
Schema, SQL Migration, SQL Server, SQL Server Security

Using synonyms can hide a cross-database object name from callers, but permissions, dependency checks, and deployment still need care.

Read More
A garden trellis with vines tied on with twine, and one vine leaning against it without any tie

Drawing a Diagram of an Existing Database

April 24, 2008
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL Documentation, SQL Server, SQL Server Management Studio

A diagram of an existing database starts with real foreign keys, uses SSMS to reveal relationships, and records the important paths a picture misses.

Read More
LEFT OUTER JOIN - WHERE NULL.

SQL SERVER – Converting Subqueries to Joins

April 23, 2008
Pinal Dave
SQL Performance
SQL Joins, SQL Performance, SQL Scripts, SQL Server

Developers often write subqueries where Joins would do, or the other way around. A short note on converting between the two, with links to my earlier examples.

Read More
SQL SERVER - Join Better Performance - LEFT JOIN or NOT IN?

SQL SERVER – Join Better Performance – LEFT JOIN or NOT IN?

April 22, 2008
Pinal Dave
SQL Performance
SQL Joins, SQL Scripts, SQL Server

LEFT JOIN or NOT IN: which one gives Join Better Performance? It depends on the data. Compare the two queries and their execution plans on AdventureWorks.

Read More
Gouache painting: seen from above, three furrows lie side by side: one long, one shorter, one long

EOMONTH: Month Ends Are Different From DATEADD Month Clipping

April 21, 2008
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Server

EOMONTH gives me a month-end date when that is the actual reporting requirement. DATEADD moves a date by a month. These operations can agree for one step and disagree on the next.

Read More
SQL SERVER - Identifiers As Valid Object Names

SQL SERVER – Identifiers As Valid Object Names

April 20, 2008
Pinal Dave
SQL Tips and Tricks
SQL System Table

Chi-Ho Min found you can skip parts of a four part name with dots, like servername…tablename. Here is how identifiers work as valid object names.

Read More
Previous 1 … 760 761 762 763 764 765 766 … 841 Next
  • Books
  • Testimonials
  • Privacy Policy

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