Memory grants 7: DISTINCT (Distinct Sort)
The series is alive! It’s been a while since I last talked about memory grants. Don’t worry, I still care...
2019-02-21
392 reads
The series is alive! It’s been a while since I last talked about memory grants. Don’t worry, I still care...
2019-02-21
392 reads
I didn’t expect anything for free in index maintenance. After all, it takes a lot of CPU and transaction log...
2019-02-20 (first published: 2019-01-30)
2,411 reads
Yesterday’s post talked about single use plans. The statements I’m using are also called ad hoc queries. The alternative to...
2019-02-20
300 reads
So, we’ve set up a table with table partitioning on the RIGHT for CreationDate. We defined 11 partitions, and in...
2019-02-18
154 reads
Happy Friday! Today’s post will be light on the performance side and instead, I’m going to talk about how to...
2019-02-15
1,529 reads
This is the sequel to “It’s always parameter sniffing (part 1).” In that post, we identified the stored procedure, and...
2019-02-14 (first published: 2019-01-23)
2,508 reads
In Partitioning 1, my query searched through all 1-12 partitions. Let’s see if we can reduce that number.
Adding the partitioning...
2019-02-13
1,554 reads
This month’s T-SQL Tuesday is hosted by Andy Leonard at andyleonard.blog . Andy asks us, what is your “Why?”
So what is...
2019-02-12
680 reads
Proceed with caution, if you’re thinking of using query hints. This post will specifically cover min_grant_percent and max_grant_percent.
My opinion on...
2019-02-11 (first published: 2019-01-22)
9,445 reads
I apologize in advance if I mess up the terminology.
I’ve worked with a moderate read workload on a readable replica...
2019-02-08
769 reads
By Steve Jones
ecstatic shock – n. a surge of energy upon catching a glimpse from someone...
By Chris Yates
The New Arena of Leadership The role of the Chief Data Officer is no...
Presenting you with an updated version of our sp_snapshot procedure, allowing you to easily...
Just saw the "Azure Extension for SQL Server" Does anyone has experience with it?...
I've noticed several instances of what looks like a recursive insert with the format:...
Comments posted to this topic are about the item Cleaning Up the Cloud
I have a table with this data:
TravelLogID CityID StartDate EndDate 1 1 2025-01-01 2025-01-06 2 2 2025-01-01 2025-01-06 3 3 2025-01-01 2025-01-06 4 4 2025-01-01 2025-01-06 5 5 2025-01-01 2025-01-06I run this code:
SELECT IDENT_CURRENT('TravelLog')I get the value 5 back. Now I do this:
SET IDENTITY_INSERT dbo.TravelLog ON INSERT dbo.TravelLog ( TravelLogID, CityID, StartDate, EndDate ) VALUES (25, 5, '2025-09-12', '2025-09-17') SET IDENTITY_INSERT dbo.TravelLog OFFI now run this code.
DBCC CHECKIDENT(TravelLog) GO INSERT dbo.TravelLog ( CityID, StartDate, EndDate ) VALUES (4, '2025-10-14', '2025-10-17') GOWhat is the value for TravelLogID for the row I inserted for CityID 4 and dates starting on 14 Oct 2025? See possible answers