thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Data & Analytics · Intermediate

Query Optimizer

The database component that evaluates possible ways to run a query and picks the lowest-cost plan.

Definition

Cost-based optimizers estimate the cost of plans using statistics on table sizes and value distributions, then choose join orders, join algorithms and access paths. Because SQL is declarative, the optimizer, not the author, decides how the query executes.

Exam tip

Bad estimates caused by outdated statistics are a top reason the optimizer picks a poor plan.

Related terms