Answer
Query optimization is the process of choosing an efficient execution plan for a SQL statement. • The optimizer compares possible scans, joins, and operation orders. • Statistics help estimate row counts and costs. • Developers improve results with correct queries, useful indexes, current statistics, and measurement.
💡 SQL Example
EXPLAIN ANALYZE SELECT * FROM orders WHERE customer_id = 10;
Result
The actual and estimated execution plan
⚡ Quick Revision
Query optimization chooses a plan; tuning supplies better structure and evidence.