EXPLAIN the WHERE
Running a query with EXPLAIN
does not actually run the query. Thus, EXPLAIN
provides estimates of the query plan. The cost, rows, and width are all estimates. Some query structures result in better estimates than other structures.
You will take another look at Hawaiian air quality, focusing on the days where multiple locations fell into that AQI category (good, moderate, etc.). You will then look at the impact of a partition on the query plans estimates. Does the partition change the planner's estimates?
Cet exercice fait partie du cours
Improving Query Performance in PostgreSQL
Exercice interactif pratique
Essayez cet exercice en complétant cet exemple de code.
SELECT ___(___)
FROM daily_aqi
WHERE state_code = 15 -- Hawaii state code
AND no_sites > 1;