-->
SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Bert Wagner

Bert Wagner is a Business Intelligence Developer at Progressive Insurance. He enjoys solving challenging data transformations with T-SQL and optimizing for query performance. In addition to BI development, Bert loves building ASP.NET MVC web apps and building Internet of Things projects.

Join Elimination: When SQL Server Removes Unnecessary Tables

In this post and video at SQLPerformance.com, I discuss what join elimination is and how it works in SQL Server.  Join elimination is one of the many techniques that the SQL Server query optimizer uses to create efficient query plans. Specifically, join elimination occurs when SQL Server can establish… Read more

0 comments, 158 reads

Posted in Bert Wagner on 19 June 2018

Prioritizing Index Performance Pains – What I Learned From Brent Ozar’s Master Index Tuning Class

I love continuing my education in SQL Server.  Recently I was fortunate enough to take Brent Ozar’s 3-day live online Master Index Tuning training class.

Since I had never taken an online class before, I thought it’d be fun to write a mini-review of what I thought about the… Read more

0 comments, 2,024 reads

Posted in Bert Wagner on 12 June 2018

4 Ways To Define Lookup Values In A Query

Watch this week’s episode on YouTube.

Occasionally you may need to create a lookup table of values for a single query.  Building a permanent table of these values is a good option if you need to reuse the values frequently, but for one-off, ad-hoc queries you may want to… Read more

6 comments, 3,137 reads

Posted in Bert Wagner on 5 June 2018

What Does The GO Command Do?

Watch this week’s episode on YouTube.

When I started working with T-SQL, I thought the GO command was optional, kind of like semicolons.  It appeared in plenty of SSMS generated scripts, but it seemed like I never had to add it to any queries of my own:

SELECT…

Read more

4 comments, 3,013 reads

Posted in Bert Wagner on 29 May 2018

Converting JSON to SQL Server CREATE TABLE Statements

Watch this week’s episode on YouTube.

Tedious, repetitive tasks are the bane of any lazy programmer.  I know, because I am one.

One such repetitive task that I find comparable to counting grains of rice is building database layouts from JSON data sources.

While some online services exist that will… Read more

0 comments, 2,650 reads

Posted in Bert Wagner on 22 May 2018

Why Is My VARCHAR(MAX) Variable Getting Truncated?

Watch this week’s episode on YouTube.

Sometimes SQL Server doesn’t do what you tell it to do.

Normally that’s ok – SQL is a declarative language after all, so we’re supposed to tell it what we want it to do, not how we want it done.

And while that’s… Read more

0 comments, 267 reads

Posted in Bert Wagner on 15 May 2018

Contributing to Community

This post is a response to this month’s T-SQL Tuesday #102 prompt by Riley Major. T-SQL Tuesday is a way for SQL Server users to share ideas about different database and professional topics every month.

The prompt I’ve chosen to write about this month is how and why I… Read more

0 comments, 476 reads

Posted in Bert Wagner on 8 May 2018

Is It Possible To Conditionally Index JSON Data?

Check out this week’s episode on YouTube.

Recently I received a great question from an attendee to one of my sessions on JSON (what’s up Nam!):

At first glance it sounds like a filtered index question, and ultimately it is, but because of some of the intricacies involved in… Read more

0 comments, 1,695 reads

Posted in Bert Wagner on 1 May 2018

The Forgotten Fourth SQL Server Recovery Model

SQL Server recovery models define when database transactions are written to the transaction log.   Understanding these models is critical for backup and recovery purposes as well as for how their behaviors impact the performance of queries.

Today we’ll examine the differences between SQL Server’s three official recovery models as well… Read more

1 comments, 2,718 reads

Posted in Bert Wagner on 24 April 2018

In-Memory OLTP: A Case Study

Watch this week’s episode on YouTube.

When In-Memory OLTP was first released in SQL Server 2014, I was excited to start using it.  All I could think was “my queries are going to run so FAST!

Well, I never got around to implementing In-Memory OLTP.  Besides having an… Read more

1 comments, 2,299 reads

Posted in Bert Wagner on 17 April 2018

3 Essential Tools For The SQL Server Developer

This post is a response to this month’s T-SQL Tuesday #101 prompt by Jens Vestergaard. T-SQL Tuesday is a way for SQL Server bloggers to share ideas about different database and professional topics every month.

This month’s topic is about what essential SQL Server related tools you use on… Read more

1 comments, 244 reads

Posted in Bert Wagner on 10 April 2018

Power Query vs DAX: In The Power BI Kitchen with Eugene Meidinger

Watch this week’s episode on YouTube.

In this week’s video with Power BI expert Eugene Meidinger, we’re in the kitchen learning about Power BI.

Power BI has two languages available for working with data: Power Query and DAX.

Power Query is most useful cleaning and preparing your data… Read more

1 comments, 1,799 reads

Posted in Bert Wagner on 3 April 2018

AT TIME ZONE: The easy way to deal with time zones and daylight savings time

Many people think daylight savings time was created to help align the hours that the sun is up with our waking hours so farmers and school children didn’t have to be outside in the dark.  Or something like that.

Well let me fill you in on a little secret –… Read more

5 comments, 3,312 reads

Posted in Bert Wagner on 27 March 2018

How To Steal Data Using Second Order SQL Injection Attacks

One misconception some people have about SQL injection is that it can only happen when concatenating a user input parameter directly into your dynamically built query string:

While this type of injection flaw is easy to spot, there are other less direct ways an injection attack can occur.

Second Order…

Read more

0 comments, 4,002 reads

Posted in Bert Wagner on 20 March 2018

Full Automatic Tuning: SQL Server 2026’s Most Killer Feature

This post is a response to this month’s T-SQL Tuesday #100 prompt by the creator of T-SQL Tuesday himself, Adam Machanic.   T-SQL Tuesday is a way for SQL Server bloggers to share ideas about a different database or professional topic every month.

This month I’m going down the science… Read more

1 comments, 174 reads

Posted in Bert Wagner on 13 March 2018

2.5 Ways Your ORM Is Vulnerable To SQL Injection

Someone recently told me that they don’t need to worry about SQL injection because they are using an ORM.

Oh boy.

ORMs don’t automatically prevent SQL injection

Object-relational mapping (ORM) tools allow developers to easily access an application’s data layer without having to write lots of redundant code.

 

Most… Read more

0 comments, 2,357 reads

Posted in Bert Wagner on 6 March 2018

Splitting It Up: Side by Side Queries In SSMS

There are times when you are writing a query while referencing another piece of information: the results of another query, a variable value, a webpage, etc…

If using two monitors you can have a query window on each as a reference, or you can resize two query window tabs so… Read more

0 comments, 91 reads

Posted in Bert Wagner on 27 February 2018

OR vs UNION ALL – Is One Better For Performance?

Today I want to show you a trick that could make your queries run faster.

It won’t always work, but when it does everyone will be impressed with your performance tuning prowess.  Let’s go!

Watch this week’s episode on YouTube.

Our Skewed Data

Let’s create a table and insert…

Read more

0 comments, 59 reads

Posted in Bert Wagner on 20 February 2018

What I Do When I’m NOT Writing SQL

This post is a response to this month’s T-SQL Tuesday prompt created by Aaron BertrandAdam Machanic created T-SQL Tuesday as a way for SQL users to share ideas about interesting topics every month.  This month’s topic is “Your passions outside of SQL Server”.


Getting away

I spend… Read more

1 comments, 45 reads

Posted in Bert Wagner on 13 February 2018

“How do I contribute to dbatools?” with Drew Furgiuele

This weekend I caught up with Drew Furgiuele at SQL Saturday Cleveland and learned how to get involved with the open-source dbatools PowerShell module.

If you don’t use dbatools yet, what are you waiting for?  It’s an amazing community project that will help you automate your SQL Server work with… Read more

0 comments, 41 reads

Posted in Bert Wagner on 6 February 2018

Older posts