Get startedGet started for free

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?

This exercise is part of the course

Improving Query Performance in PostgreSQL

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

SELECT ___(___)
FROM daily_aqi
WHERE state_code = 15 -- Hawaii state code
AND no_sites > 1;
Edit and Run Code