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
Recorded test: bigint used 848 leaf pages at 99 percent fullness; GUID used 1292 at 68.8 percent

When a GUID Clustered Primary Key Gets Expensive

October 14, 2026
Pinal Dave
SQL Performance
Clustered Index, SQL Datatype, SQL Index, SQL Performance

A GUID primary key can be useful. Learn when a GUID clustered primary key gets expensive, from page splits to index size, and when a bigint key can help.

Read More
Two hands husking corn at a market stall, stripped husks heaped aside and clean cobs in a bowl.

Cleaning Currency Strings Into decimal Values

August 1, 2024
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Server, SQL String

Convert currency strings into decimal amounts using known symbols, explicit parsing cultures, conversion checks, and rejection evidence.

Read More
A huge roasting tray in an open oven holding one small sausage in the middle.

Oversized varchar Columns and Inflated Memory Grants

September 18, 2023
Pinal Dave
SQL Performance
Execution Plan, SQL Datatype, SQL Memory, SQL Performance, SQL Server

Investigate oversized varchar declarations, compare sort memory grants, and narrow string columns safely without losing valid data.

Read More
A hand testing eggs through a wooden sizing ring before packing them, two oversized eggs set aside in a red bowl.

TRY_CAST vs CAST: Finding Rows That Will Not Convert Before a Load

December 7, 2022
Pinal Dave
SQL Tips and Tricks
ETL, SQL Datatype, SQL DateTime, SQL Function, SQL Server

Find text values that will not convert before loading, separate invalid and missing input, and use explicit date styles and culture parsing.

Read More
Gouache painting of three potted seedlings on a greenhouse shelf, the middle one in a deep vermilion pot and slightly taller, with a wooden ruler leaning at the front

Simple Interest in SQL Server: A Function That Keeps Cents

April 30, 2021
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts, SQL Server

Simple interest in SQL Server is principal times rate times years divided by 100, and a T-SQL function returns it in one line. This post shows how an int return type drops the cents and what SCHEMABINDING changes. It measures the cost of a scalar function on 500,000 rows and ends with compound interest.

Read More
Gouache illustration of the difference between Count and COUNT_BIG, with small and large token containers beside separate assembly fittings.

SQL SERVER – Difference Between Count and Count_Big

April 29, 2021
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Scripts, SQL Server

The difference between Count and COUNT_BIG includes result range and indexed-view requirements. Their row-counting rules are the same.

Read More
A wide tractor at a narrow field gateway, turning along the hedge to take the long way round the field.

JDBC and sendStringParametersAsUnicode: The Hidden Index Scan

April 12, 2021
Pinal Dave
SQL Performance
Java, SQL Datatype, SQL Index, SQL Server, Unicode

Diagnose sendStringParametersAsUnicode conversions, align JDBC parameters with varchar indexes, and preserve required Unicode data.

Read More
1 2 3 4 … 31 Next
  • Books
  • Testimonials
  • Privacy Policy

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