79580814

Date: 2025-04-18 10:04:34
Score: 0.5
Natty:
Report link

The reason is that PostgreSQL does not consider your filters to be partitioning filters.
You need to change the query as follows (only 1 table will be scanned):

SELECT COUNT(*) FROM my_table
WHERE timestamp_field BETWEEN '2022-01-28' AND '2022-02-02'
AND EXTRACT(YEAR FROM timestamp_field) = 2022
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: owt