AI engineering glossary · SQL databases

What is query optimizer?

Query optimizer (also called Query planner): The database component that considers different ways to run a query, such as join orders and index choices, estimates each one's cost using table statistics, and picks the cheapest. It is why the same SQL can run in different ways.

Level: advancedTopic: SQL databases

Query optimizer: an example

For a join of a huge table and a tiny filtered one, the optimiser starts from the tiny one and uses an index on the huge one.

Related terms

More SQL databases terms

Where you learn it

Query optimizer is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.