Skip to main content
HomeSQL

Course

Improving Query Performance in SQL Server

IntermediateSkill Level
4.8+
370 reviews
Updated 02/2023
In this course, students will learn to write queries that are both efficient and easy to read and understand.
Start Course for Free
SQLProgramming4 hr16 videos58 Exercises4,450 XP24,822Statement of Accomplishment

Create Your Free Account

or

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

Loved by learners at thousands of companies

Group

Training 2 or more people?

Try DataCamp for Business

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.

Prerequisites

Intermediate SQL Server
1

Introduction, Review and The Order of Things

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.
Start Chapter
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.
Start Chapter
3

Sub-queries and presence or absence

4

Query performance tuning

Improving Query Performance in SQL Server
Course
Complete

Earn Statement of Accomplishment

Add this credential to your LinkedIn profile, resume, or CV
Share it on social media and in your performance review
Enroll Now

Don’t just take our word for it

*4.8
from 370 reviews
82%
17%
1%
0%
0%
  • Felix
    3 days ago

  • Mark Erickson
    5 days ago

  • Allan
    5 days ago

  • SVITLANA
    last week

  • Alexander
    last week

  • Feisal
    2 weeks ago

Felix

Mark Erickson

Allan

FAQs

What types of performance issues does this course teach me to fix?

You learn to optimize slow queries by improving code formatting, choosing better filtering methods, refining subqueries, and using tools like execution plans, indexes, and STATISTICS IO.

What datasets are used in the exercises?

You work with real-world datasets from sports and geoscience to practice query optimization techniques in SQL Server throughout the four chapters.

Does the course cover execution plans and indexes?

Yes. Chapter 4 introduces STATISTICS TIME, STATISTICS IO, indexes, and execution plans as tools for analyzing and tuning query performance in SQL Server.

Will I learn about the difference between WHERE and HAVING for filtering?

Yes. Chapter 2 covers best practices for using WHERE and HAVING, including common mistakes to avoid and how each filtering approach affects performance.

Is this course specific to SQL Server or applicable to other databases?

The course uses SQL Server and its specific tools like STATISTICS TIME and STATISTICS IO. However, the general principles of query optimization apply broadly to other SQL databases.

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

Create Your Free Account

or

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

Grow your data skills with DataCamp for Mobile

Make progress on the go with our mobile courses and daily 5-minute coding challenges.