intermediatetermWeb foundationsWeb foundations / Backend and APIs / Query Optimization
IntermediateNot yet reviewed

Query Optimization

The process of modifying database queries and execution plans to run as efficiently as possible with minimal resource usage.

Definition

The process of modifying database queries and execution plans to run as efficiently as possible with minimal resource usage.

Use case

Rewriting a nested SQL query using indexed JOINs to reduce runtime from 12 seconds down to 20 milliseconds.

Related terms

Articles

Query optimization

Wikipedia · Article · link checked 2026-10-16

How databases plan queries, and where slow ones come from.

Suggest a change