Grant Fritchey

Grant Fritchey is a SQL Server MVP with over 20 years’ experience in IT including time spent in support and development. Grant has worked with SQL Server since version 6.0 back in 1995. He has developed in VB, VB.Net, C# and Java. Grant has authored books for Apress and Simple-Talk, and joined Red Gate as a Product Advocate in January 2011. Find Grant on Twitter @GFritchey or on his blog as the Scary DBA.

Blog Post

Why Is “WHERE 1=0” Slow?

I saw a question the other day, questioning why they’re creation of temporary tables was so slow. What they were doing was (a much more complicated version of) this:...

2022-01-24 (first published: )

884 reads

Blog Post

Identifying Recompile Causes

Strictly speaking, a recompile isn’t really a performance tuning problem. In fact, a lot of time, recompiles are desired because they reflect changes in statistics which are likely to...

2022-01-12 (first published: )

272 reads

SQLServerCentral Editorial

Where the World Takes You

We're launching into a new year and there are lots of "looking into the future" articles out there. Personally, I'm pretty jazzed for the coming year for any number of reasons (can you say "SQL Server 2022"?). However, I also get a little retrospective at times like this. Now, I'm not going to talk about […]

You rated this post out of 5. Change rating

2022-01-08

156 reads

SQLServerCentral Editorial

Tell Your Loved Ones You Care

The Data Platform community lost a couple of people this week. Euan Garden and Dean Vargas. These were good people. They're going to be sorely missed. While I wanted to say something profound about them, I don't think I can do them justice. They were both simply good. The kind of people you want to […]

5 (1)

You rated this post out of 5. Change rating

2021-12-18

214 reads

SQLServerCentral Editorial

It's All About the Gratitude

I'm writing this the day after the US holiday of Thanksgiving. Lots of things are said about Thanksgiving, positive, negative, in between. The core concept of the holiday is to take a moment to take stock of what you have. It's a good idea. Every so often, look around and acknowledge, depending on anyone's situation, […]

5 (3)

You rated this post out of 5. Change rating

2021-11-27

83 reads

SQLServerCentral Editorial

SQL Server 2022 and Learning

Microsoft announced the release of the next version of SQL Server, 2022. There's a bunch of new enhancements that we can all get excited about. I can't wait to test the "Parameter Sensitive Plan" optimization myself. We can look forward to seeing this stuff in action, and in detail, at the PASS Data Community Summit […]

You rated this post out of 5. Change rating

2021-11-06

400 reads

SQLServerCentral Editorial

Learning Is Challenging, So, Forgive Yourself

In addition to trying to get better at SQL Server, Redgate Software, and all the various aspects of my job, I'm also trying to get better at this whole human interaction thing AND I'm working on trying to learn PostgreSQL much more deeply. Whew! Yeah, may not seem like a whole lot, but I assure […]

5 (2)

You rated this post out of 5. Change rating

2021-10-16

245 reads

Blog Post

Login Timeouts

I was recently approached at work about a company that was seeing tons of timeouts in SQL Server. I was asked how to troubleshoot this. There are lots of...

2021-10-06 (first published: )

569 reads

Blogs

Simple Talks Episode 9–Data masking and subsetting

By

The episode on data masking and subetting is out. You can see it here:...

T-SQL Tuesday #180: Avoid Perfect for Good Enough

By

I'm listening to Effortless by Greg McKeon (link to author's page) through Audible.com. He...

Book Review – Humanizing Data Strategy by Tiankai Feng

By

This book was making its rounds on social media, and the concept seems interesting...

Read the latest Blogs

Forums

Does SSRS Report with Stored Procedure execute SQL string?

By danyeungw

I declare @Where based on the input parameter in the stored procedure. Set @SQL...

SQL Server Constrained Delegation

By cw255

Hi, hoping someone can help. We're in the process of migrating to a new...

Get Sum and Last month sum

By GrassHopper

I want to get the sum and I want to get the sum of...

Visit the forum

Question of the Day

Comparing Images

I am building an ETL process between these tables in SQL Server 2022 set to 160 compatibility level:

CREATE TABLE Image_Staging
( imageid     INT NOT NULL CONSTRAINT Image_StagingPK PRIMARY KEY
, imagestatus TINYINT
, imagebinary IMAGE);
GO

CREATE TABLE Images
( imageid       INT NOT NULL CONSTRAINT ImagesPK PRIMARY KEY
, imagestatus   TINYINT
, imagemodified DATETIME
, imagebinary   IMAGE);
GO
I want to run this query to check if the images already loaded exist. This will help me decide if I need to insert or update an image. What happens with this query?
SELECT i.imageid
FROM
  dbo.Image_Staging AS ist
  INNER JOIN dbo.Images AS i
    ON ist.imagebinary = i.imagebinary;

See possible answers