On Wed, Jun 21, 2023 at 2:32 PM Wells Oliver <wells.oliver@xxxxxxxxx> wrote:
Dead simple date scan across a big-ish table (est. 23,153,666 rows)
Simple, but massive.
You should turn on track_io_timing (if it is not already) and then do EXPLAIN (ANALYZE, BUFFERS)
You haven't shown that poor performance is due to the parallel seq scan, only that one particular plan happens to have both of those features at the same time. If you disable parallel queries (max_parallel_workers_per_gather=0), what plan do you get instead and how long does it take? What if you turn off enable_seqscan altogether?