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 - Puzzle - Challenge - Error While Converting Money to Decimal

SQL SERVER – Puzzle – Challenge – Error While Converting Money to Decimal

November 27, 2010
Pinal Dave
SQL Puzzle
SQL Error Messages, SQL Scripts

A puzzle for you: why does converting money to decimal throw Msg 8115, an arithmetic overflow error, when you cast 12345.67 as DECIMAL(5,2)? Share your answer.

Read More
SQL SERVER - Challenge - Puzzle - Usage of FAST Hint

SQL SERVER – Challenge – Puzzle – Usage of FAST Hint

November 26, 2010
Pinal Dave
SQL Puzzle

When does the FAST hint help? It asks SQL Server to return the first rows quickly, yet my tests showed no change in time. Can you find a good example?

Read More
SQL SERVER - SQL Challenge - SQL Puzzle - Query Creating Most TempDB IO Usage

SQL SERVER – SQL Challenge – SQL Puzzle – Query Creating Most TempDB IO Usage

October 27, 2010
Pinal Dave
SQL Puzzle
Best Practices, Database, SQL Scripts, SQL TempDB

My SQL puzzle: which queries create the most TempDB IO and grow its size? Answer with any DMV, and all valid answers get published here with credit.

Read More
A herbarium studio shows two separate oak cabinets storing different arrangements of the same botanical specimens.

Indexed View Quiz: The Table and Clustered Index Confusion

October 7, 2010
Pinal Dave
SQL Puzzle
Execution Plan, SQL Index, SQL Server, SQL View

An indexed view and its base table can each own a clustered index because they are separate objects. Inspect both owners in a SQL example and see why a view index does not give its base table a second clustered index.

Read More
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 - Question - How to Convert Hex to Decimal

SQL SERVER – Question – How to Convert Hex to Decimal

February 1, 2010
Pinal Dave
SQL Puzzle

An inline function converting Hex to Decimal was slowing a client query. I tuned it, and now I ask readers to share the scripts they use for this.

Read More
Results window of AdventureWorks.

SQL SERVER – Size of Index Table – A Puzzle to Find Index Size for Each Index on Table

November 18, 2009
Pinal Dave
SQL Puzzle
SQL Index, SQL Scripts, SQL Stored Procedure

sp_spaceused shows the total index size of a table. My puzzle for you: write a query that adds the size of each index to the sys.indexes list.

Read More
Previous 1 … 16 17 18 19 20 21 22 Next
  • Books
  • Testimonials
  • Privacy Policy

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