Interactive Course

Improving Query Performance in SQL Server

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

  • 4 hours
  • 16 Videos
  • 58 Exercises
  • 1,253 Participants
  • 4,450 XP

Loved by learners at thousands of top companies:

deloitte-grey.svg
roche-grey.svg
whole-foods-grey.svg
mls-grey.svg
rei-grey.svg
mercedes-grey.svg

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.

  1. 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.

  2. Query performance tuning

    Students are introduced to how STATISTICS TIME, STATISTICS IO, indexes, and executions plans can be used in SQL Server to help analyze and tune query performance.

  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.

  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.

  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.

  4. Query performance tuning

    Students are introduced to how STATISTICS TIME, STATISTICS IO, indexes, and executions plans can be used in SQL Server to help analyze and tune query performance.

What do other learners have to say?

Devon

“I've used other sites, but DataCamp's been the one that I've stuck with.”

Devon Edwards Joseph

Lloyd's Banking Group

Louis

“DataCamp is the top resource I recommend for learning data science.”

Louis Maiden

Harvard Business School

Ronbowers

“DataCamp is by far my favorite website to learn from.”

Ronald Bowers

Decision Science Analytics @ USAA

Dean Smith
Dean 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
Collaborators
  • Mona Khalil

    Mona Khalil

  • Becca Robins

    Becca Robins

  • Marianna Lamnina

    Marianna Lamnina

Icon Icon Icon professional info