Am 06.02.2018 um 08:24 schrieb Michael Krüger: > create or replace function reports.generic_query(_sql text) > RETURNS SETOF record > LANGUAGE 'plpgsql' > PARALLEL SAFE > COST 100
there is an other parameter, parallel_setup_cost, with default = 1000. I think, you should set this parameter too.