Hi, 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.
Please keep me informed, it is interessting me. Regards, Andreas -- 2ndQuadrant - The PostgreSQL Support Company. www.2ndQuadrant.com