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 row of small potted plants and one giant thirsty plant in a red pot beside an empty watering can

Find the Most Resource Intensive Queries in SQL Server

October 3, 2012
Pinal Dave
SQL Performance
SQL CPU, SQL DMV, SQL Monitoring, SQL Scripts

To find resource intensive queries, read sys.dm_exec_query_stats and rank the cached statements by reads, CPU or time. This post builds a small demo, ranks it two ways, and fixes the worst offender with one index. It also explains what the numbers can and cannot tell you.

Read More
Gouache painting of a balance scale where one small framed painting with a red frame outweighs a heap of pebbles

Draw Pictures with T-SQL: The SSMS Spatial Results Tab

September 28, 2012
Pinal Dave
SQL Tips and Tricks
Spatial Database, SQL Scripts, SQL Server Management Studio

The SSMS Spatial results tab draws every geometry value a query returns. This post draws a house and a tree with STGeomFromText and STBuffer, explains labels and the 5,000 object limit, and checks store service areas for overlaps and gaps.

Read More
Gouache painting of four nested bowls on a kitchen counter with the smallest center bowl painted red

Order of Operations in SQL Server: How PEMDAS Works in T-SQL

September 25, 2012
Pinal Dave
SQL Tips and Tricks
Mathematics, SQL Operator, SQL Scripts, SQL Server

The order of operations in SQL Server follows PEMDAS, so 6/2*(1+2) returns 9. This post walks through the precedence rules with tested queries. It also covers integer division, the negative number trap and AND before OR.

Read More
Several separate cabinets expose their fittings for inspection beside a plain marker and lens.

SQL SERVER – Validating Unique Column Name Across Whole Database

September 22, 2012
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL System Table

A Unique Column Name check lists existing matches across visible database metadata. I use it as an inspection, not an enforcement guarantee.

Read More
Gouache painting of two trays of buttons, one mixed together and one sorted by size, with one large red button

Effect of Collation on Result Sets in SQL Server

September 19, 2012
Pinal Dave
SQL Tips and Tricks
SQL Collation, SQL Group By, SQL Order By, SQL Scripts

The effect of collation on result sets is easy to see once you run the same query against two collations. This post builds a small demo and shows how sorting, comparing and grouping change. It also explains collation conflicts, including the one temp tables cause.

Read More
SQL SERVER - SQL Server Statistics Name and Index Creation

SQL SERVER – SQL Server Statistics Name and Index Creation

September 17, 2012
Pinal Dave
SQL Performance
SQL Error Messages, SQL Index, SQL Scripts, SQL Server, SQL Statistics

Guest author Sandip hit Msg 1913 while creating an index, because an index or statistics with that name already existed. A lesson on statistics name and index creation.

Read More
Three simple ceramic cups containing different amounts of water on a small wooden tray.

When One Number Has Three Different Answers

September 16, 2012
Pinal Dave
SQL Tips and Tricks
Best Practices, Database, SQL Scripts, SQL Server

Diagnose reporting inconsistency by matching filters, refresh cutoffs, and row grain before comparing totals from different reports.

Read More
Previous 1 … 200 201 202 203 204 205 206 … 366 Next
  • Books
  • Testimonials
  • Privacy Policy

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