Description

Advanced SQL: Reading Execution Plans, Indexing and Rewriting Slow Queries

Turn a query that locks up the database into one the engine executes in seconds

  • 1 day — 7 h
  • In-person or virtual
  • Intermediate
  • Up to 6 participants

A query that used to run in a few seconds now takes several minutes. Volumes have grown, joins have piled up and nobody can say where the time is actually being lost. An index is added on instinct, results are cached, the job is rescheduled overnight — and the problem returns as soon as the data changes.

This one-day programme teaches diagnosis before modification. Participants read an execution plan, identify the costly operations, then choose between rewriting, indexing and adjusting the data model. They leave with a repeatable method to measure the gain achieved and to avoid optimisations that degrade the rest of the application.

Learning objectives

  • Measure the real cost of a query and isolate the most resource-intensive step
  • Interpret an execution plan and the operations selected by the engine
  • Choose the index type suited to the filters and sort order requested
  • Rewrite a query to limit full table scans
  • Use window functions instead of repeated sub-queries
  • Assess the gain obtained and verify that no regression has been introduced

What makes this programme different

Slow queries brought by participants are diagnosed live during the session
Every optimisation is measured before and after on a large data set
Unnecessary indexes are hunted down just as carefully as missing ones

Programme

1Diagnose before optimising

Knowing where the time goes

  • Measuring execution time and the volume of rows processed
  • Reading an execution plan and the data access operations
  • Engine statistics and cardinality estimation
  • Identifying the most costly queries in an application

2Indexing and the data model

Helping the engine find data fast

  • Single-column, composite and covering indexes
  • Column order within a composite index
  • Impact of indexes on writes and their maintenance cost
  • Detecting unused or redundant indexes
  • Targeted denormalisation and aggregate tables

3Rewriting queries

Achieving the same result another way

  • Correlated sub-queries and join-based alternatives
  • Window functions for group-level calculations
  • Common table expressions and readability
  • Processing large volumes in batches
  • Efficient pagination over long result sets

Who is it for

Data analysts, developers and database administrators dealing with slow queries on large data volumes.

Prerequisites

Ability to write SQL queries fluently, including joins and aggregations.

Dates & locations

36 scheduled dates between November 2026 and December 2027. Seats are confirmed in the order enquiries are received.

November 2026

December 2026

January 2027

February 2027

March 2027

April 2027

May 2027

June 2027

September 2027

October 2027

November 2027

December 2027

None of these dates suit you? We open additional sessions on request, and any programme can be run privately for your team.

Practical details

Before the programme
Online positioning questionnaire. Your development objectives are shared with the trainer, who tailors the practical case studies to your context.
Teaching methods
Theoretical input, workshops and practical case studies. Digital course materials and method sheets provided.
Assessment
Multiple-choice tests and role-play exercises. Assessment of learning at the start and end of the programme, with immediate and 60-day follow-up evaluations.
After the programme
One year of access to the e-learning platform. Self-assessment of the skills acquired and a 30-day follow-up session with your trainer.
How to register
Registration online or on the basis of a quotation.
Lead time
11 working days after confirmation of registration.
Accessibility
Accessible to people of determination. Contact our accessibility coordinator to design a suitable solution: contact@mpf-academy.ae
Start dates
Rolling intake: in addition to the scheduled sessions, this programme can start on request.