Setting the Sample Rate for Auto Stats updates
SQL Server functionality can move on pretty quickly sometimes, and it’s not always all about the big features but the...
2017-09-12
2,348 reads
SQL Server functionality can move on pretty quickly sometimes, and it’s not always all about the big features but the...
2017-09-12
2,348 reads
A while ago now I was running some Performance Tuning workshops and was asked how you can find out which Statistics...
2017-09-01
431 reads
I thought I’d do another chess puzzle this month. This one is a variant on the Eight Queens problem:
SQL Puzzle...
2017-09-01 (first published: 2017-08-22)
2,350 reads
I mentioned in my previous post about manually updating statistics that you can specify whether they’re updated using a full...
2017-08-23 (first published: 2017-08-15)
1,505 reads
In the monthly SQL blogging party that is T-SQL Tuesday (brainchild of Adam Machanic), Kendra Little has invited us this...
2017-08-08
1,435 reads
Even though SQL Server automatically updates statistics in the background for you, you may find there are times when you...
2017-08-01
2,449 reads
I’ve mentioned previously how not having up to date statistics can cause problems in query performance. This post looks at...
2017-08-09 (first published: 2017-07-25)
7,758 reads
There was a bit of chat today on the SQL Community slack about UTC and Daylight Saving Time. It reminded...
2017-08-07 (first published: 2017-07-19)
2,557 reads
This puzzle was first proposed in 1848 by a composer of chess puzzles called Max Bezzel and has since spawned...
2017-08-04 (first published: 2017-07-19)
2,209 reads
T-SQL Tuesday
For T-SQL Tuesday this month Raul Gonzalez has asked us all to blog about lessons learnt the hard way:
http://www.sqldoubleg.com/2017/07/03/tsql2sday-92-lessons-learned-the-hard-way/
My...
2017-07-24 (first published: 2017-07-11)
9,356 reads
By Steve Jones
I caught this interesting item over on Pinal Dave’s blog: Eleven Interview Questions that...
By Hemantgiri
I use color-coded connections in SSMS to distinguish Production, Pre-Production, UAT, and Development. But...
Comments posted to this topic are about the item Split Large Queries in Athena...
Comments posted to this topic are about the item Finding Trailing Spaces
I have some data in a SQL Server 2025 database. It looks like this for the dbo.Customer table:
CustomerID CustomerName PreferredName 1 Steve Steve 2 Andy Andy 3 Brian Brian 4 Allan Allan 5 Devin Devin 6 Steve Steve 7 Sally SallyI want to detect which names have a single trailing space. The CustomerName is a varchar() and the PreferredName is a CHAR(). Does this query detect the problem rows?
SELECT
CustomerID,
CustomerName,
PreferredName
FROM Customer
WHERE CustomerName <> RTRIM(CustomerName)
OR PreferredName <> RTRIM(PreferredName); See possible answers