A query can return the right answer while asking PostgreSQL to inspect unnecessary rows. A function applied to an indexed column may prevent a plain index from supporting a range condition. For a UTC day on a timestamp, compare the original timestamp against a half-open interval instead of converting every row to text.
Correctness comes first. Rewriting a join as a filter can change duplicates, missing values or the population a report preserves. Compare the full result on boundary data before calling the rewrite an improvement. Then inspect the actual plan for reduced repeated work.
These exercises use enable_seqscan=off only as a teaching diagnostic that makes available index conditions visible on tiny tables. That setting isn't a production recommendation. Costs and timings remain environment-dependent. The goal is an access path that matches the filter while preserving the report's meaning.
The half-open range can become an index condition and excludes February 1.