Sql-Server

Category: sql-server

The SQL Server Data Row Size Question: Why Is It Bigger?

The SQL Server Data Row Size Question: Why Is It Bigger?

This morning, I received the following question from a user:

Could you please clarify SQLServer “Data Row” size: If I run the script below on SQL Server 2012, then Slot(row) Size is 710 bytes if I run the same script against SQL Server 2016 and above, then Slot(row) Size is 724 bytes.

They then provided a script which creates and inserts a few rows into a sample table, runs the DBCC IND command to find a list of pages for the sample table, then uses the DBCC PAGE command to examine the page.

Continue reading

Fix My Functions: Speeding Up Scalar and Table Valued UDFs (video)

Fix My Functions: Speeding Up Scalar and Table Valued UDFs (video)

Last week, I presented on the topic of TSQL User Defined Functions (UDFs) in SQL Server at the PASS Summit.

Continue reading

ORDER BY, OFFSET, and Fetch in TSQL

ORDER BY, OFFSET, and Fetch in TSQL

By Kendra Little on June 29, 2018

My most recent Quizletter featured a quiz on ORDER BY in TSQL, complete with questions on the OFFSET and FETCH clauses which we got in SQL Server 2012.

One great thing about teaching TSQL School is that it reminds me of these cool options that can be easy to forget.

Continue reading

AVG() in TSQL: Watch Your Data Types

AVG() in TSQL: Watch Your Data Types

This week’s Quizletter featured a quiz on using the AVG() function in SQL Server.

I was inspired to write this quiz because I’ve been teaching “TSQL School” each week. When we covered aggregate functions, I remembered how tricksy AVG() can be.

Continue reading

Query Store Cleanup Can be Part of a Blocking Chain

Query Store Cleanup Can be Part of a Blocking Chain

By Kendra Little on April 18, 2018

Forgetfulness can lead to learning something new. This is a bit of a nightmare when it happens in production, but a treat when it happens in an isolated test system– and that’s how I learned this.

I left a bit of blocking open on my test VM, and forgot about it.

Continue reading

Adaptive Queries in Standard Edition: Interleaved Exec for Multi-Statement TVFs

Adaptive Queries in Standard Edition: Interleaved Exec for Multi-Statement TVFs

It’s tough to keep track of which features work in each version of SQL Server, and which Editions support them.

My memory told me that the new Adaptive Joins feature in SQL Server 2017 was Enterprise Edition only…  and that’s correct, but I didn’t realize that the fancy new feature to make Multi-Statement TVFs smarter has much wider licensing.

Continue reading