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 - Size of Index Table for Each Index - Solution

SQL SERVER – Size of Index Table for Each Index – Solution

November 30, 2009
Pinal Dave
SQL Tips and Tricks
SQL Index, SQL Scripts

Two reader solutions to my puzzle: queries that show the size of the index table for each index, accurate in nearly all of my tests.

Read More
Gouache painting: at a grain stall a small tin cup overflows with tiny red lentils, spilling a heap onto the counter

DATEDIFF_BIG: Count Long Intervals Without int Overflow

November 29, 2009
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts

DATEDIFF_BIG returns bigint boundary counts. Compare a long seconds interval, reversed dates and a tiny boundary crossing without overflowing int.

Read More
SQL SERVER - Comma Separated Values (CSV) from Table Column

SQL SERVER – Comma Separated Values (CSV) from Table Column

November 25, 2009
Pinal Dave
SQL Tips and Tricks
Best Practices, CSV, SQL Scripts, SQL Server, SQL XML

The script I use most often to build Comma Separated Values (CSV) from a table column with FOR XML PATH. I think XML is the best option for code and speed.

Read More
SQL Server TOP 100 PERCENT and ORDER BY Query Comparison.

SQL SERVER – Interesting Observation – TOP 100 PERCENT and ORDER BY

November 24, 2009
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL View

ORDER BY in a view raises Msg 1033 unless TOP is used, so many developers add TOP 100 PERCENT. An interesting observation on what that really does.

Read More
Error dialog showing an error in an SQL query.

SQL SERVER – Understanding Table Hints with Examples

November 19, 2009
Pinal Dave
SQL Performance
SQL Joins, SQL Scripts

What are hints in SQL Server and when should you use them? Understanding table hints with examples, plus a word of caution about overriding the optimizer.

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
Gouache painting: a narrow wooden spice rack with exactly four small round slots stands on a kitchen counter, all four slots filled with matching small glass jars

smallmoney: Four Fractional Digits Need a Contract

November 15, 2009
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts, SQL Server

smallmoney stores a bounded numeric amount with four fractional digits. These explicit conversions show retained and changed digits without making a financial storage recommendation.

Read More
Previous 1 … 270 271 272 273 274 275 276 … 363 Next
  • Books
  • Testimonials
  • Privacy Policy

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