SP_sql_tuning_mini-project

Design Blocks Image by: Jan Antonin Kolar

Project Setup

In this project, you are given SQL queries, most of which have performance issues.Your task is to discover their performance bottlenecks and modify the queries to overcome those performance issues.

If you identify a performance bottleneck, mention the following in your solution:

  1. What was the bottleneck?
  2. How did you identify it?
  3. What method you chose to resolve the bottleneck?

What is this?

Once the script above has executed successfully, open each SQL (linked) script and optimize it if necessary to answer the questions:

  1. List the name of the student with id equal to v1 (id)
  2. List the names of students with id in the range of v2 (id) to v3 (inclusive)
  3. List the names of students who have taken course v4 (crsCode)
  4. List the names of students who have taken a course taught by professor v5 (name)
  5. List the names of students who have taken a course from department v6 (deptId), but not v7
  6. List the names of students who have taken all courses offered by department v8 (deptId)

Deliverables:

  1. One SQL file for each question
  2. Each file should have explanation regarding optimization choices as mentioned above