Re: How to query with more workers on a large table with many partitions

From: Greg Hennessy <greg(dot)hennessy(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: How to query with more workers on a large table with many partitions
Date: 2026-04-01 15:05:20
Message-ID: 0b2865ee-b220-48c1-9314-86aa34048503@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general


> I'm running PostgreSQL 16 on an AWS EC2 instance with 16 logical
> processors and 128G of RAM. How can I get PG to run the query with
> more workers?
>
Postgres allocates more workers based on the log3 of the ratio of the
table size to min_parallel_table_scan_size.

You may want to try |ALTER TABLE ... SET (parallel_workers = 10) (or
whatever your desired value is).

|

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2026-04-01 15:14:10 Re: malformated LSB header in postgres: missing LSB end marker, aborting
Previous Message Gabriel Sánchez 2026-04-01 15:04:43 Speeding up ANALYZE on large partitioned tables