Gouache painting of three ribbons with straight, zigzag and scalloped edges, the zigzag one painted red

FORMAT Function in SQL Server: Dates, Numbers and Speed

The FORMAT function turns a date or a number into text with one pattern, and it needs SQL Server 2012 or later. This post shows the patterns for dates and numbers, the culture argument, and the lower case mm that silently returns minutes instead of the month. It also measures FORMAT against CONVERT over 200,000 rows, so you know when to use which.

Read More
Gouache painting of a crowded seed tray splitting into two trays with one seedling pot painted red

Measure Page Splits in SQL Server With T-SQL

To measure page splits in SQL Server, read the Page Splits/sec counter twice and subtract the first reading from the second. This post loads a table with sequential keys and another with random keys, so you can see which splits are normal and which cost you. It also names the index behind the splits and shows how a lower fill factor removes most of them.

Read More