Skip to main content
HomeSQLImproving Query Performance in SQL Server

Improving Query Performance in SQL Server

4.5+
12 reviews
Intermediate

In this course, students will learn to write queries that are both efficient and easy to read and understand.

Start Course for Free
4 Hours16 Videos58 Exercises
20,221 LearnersTrophyStatement of Accomplishment

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.
GroupTraining 2 or more people?Try DataCamp For Business

Loved by learners at thousands of companies


Course Description

A mission critical assignment is depending on your SQL coding skills. You’ve been given some code to fix. It is giving the results you need but it’s running too slow, and it’s poorly formatted making it hard to read. The deadline is tomorrow. You’ll need to reformat the code and try different methods to improve performance. The pressure is on!!! In this course we’ll be using SQL on real world datasets, from sports and geoscience, to look at good coding practices and different ways how we can can improve the performance of queries to achieve the same outcome.
For Business

GroupTraining 2 or more people?

Get your team access to the full DataCamp library, with centralized reporting, assignments, projects and more
Try DataCamp for BusinessFor a bespoke solution book a demo.
  1. 1

    Introduction, Review and The Order of Things

    Free

    In this chapter, students will learn how SQL code formatting, commenting, and aliasing is used to make queries easy to read and understand. Students will also be introduced to query processing order in the database versus the order of the SQL syntax in a query.

    Play Chapter Now
    Introduction
    50 xp
    Formatting - player BMI
    100 xp
    Commenting - player BMI
    100 xp
    Commenting - how many Kiwis in the NBA?
    100 xp
    Aliasing
    50 xp
    Ambiguous column names
    50 xp
    Aliasing - team BMI
    100 xp
    Query order
    50 xp
    Processing order
    50 xp
    Syntax order - New Zealand earthquakes
    100 xp
    Syntax order - Japan earthquakes
    100 xp
    Syntax order - very large earthquakes
    100 xp
  2. 2

    Filtering and Data Interrogation

    This chapter introduces filtering with WHERE and HAVING and some best practices for how (and how not) to use these keywords. Next, it explains the methods used to interrogate data and the effects these may have on performance. Finally, the chapter goes over the roles of DISTINCT() and UNION in removing duplicates and their potential effects on performance.

    Play Chapter Now
  3. 3

    Sub-queries and presence or absence

    This chapter is an introduction to sub-queries and their potential impacts on query performance. It also examines the different methods used to determine if the data in one table is present, or absent, in a related table.

    Play Chapter Now

In the following tracks

SQL Server DeveloperSQL Server for Database Administrators

Collaborators

Collaborator's avatar
Mona Khalil
Collaborator's avatar
Becca Robins
Collaborator's avatar
Marianna Lamnina
Dean Smith HeadshotDean Smith

Founder, Atamai Analytics

Dean Smith is geoscientist specializing in information management systems for mining and mineral exploration. He has more than ten years of experience working with SQL Server and data visualization. Dean is the founder of Atamai Analytics, which provides information management and data analytics consulting services to the mining and mineral exploration communities.
See More

Don’t just take our word for it

*4.5
from 12 reviews
67%
17%
17%
0%
0%
Sort by
  • Julie L.
    6 months

    Nice

  • Melvin A.
    8 months

    Right to the point. I was expecting something like that.

  • Jānis Š.
    10 months

    Got to know many new things.

  • Emilio F.
    about 1 year

    This course clearly teaches how queries are executed, how we can see each step of the query and how much each step costs in performance, how and what to look for when trying to optimize queries.

  • AAYUSH M.
    over 1 year

    lot of things were new OR became obvious

"Nice"

Julie L.

"Right to the point. I was expecting something like that."

Melvin A.

"Got to know many new things."

Jānis Š.

Join over 13 million learners and start Improving Query Performance in SQL Server today!

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.