I want to benchmark some things in PostgreSQL. When I do this I normally turn off some of the features the database is currently using, just for my session, to see what the second-best plan is.
Though setting max_parallel_works = 0
, I still get a parallel plan.
QUERY PLAN
----------------------------------------------------------------------------------------------------------------------------
Gather (cost=1000.00..120892.01 rows=1000 width=15) (actual time=0.444..4781.539 rows=666667 loops=1)
Workers Planned: 2
Workers Launched: 0
-> Parallel Seq Scan on foo (cost=0.00..119792.01 rows=417 width=15) (actual time=0.102..4711.530 rows=666667 loops=1)
Filter: (lower(x) ~~ '%999.com'::text)
Rows Removed by Filter: 9333333
Planning time: 0.124 ms
Execution time: 4801.491 ms
(8 rows)
I know it says Workers Launched: 0
. But, I would like that to look like a pre-Parallel plan where the plan itself is not even planned to be parallel. How can I accomplish this?