Am 18.08.2018 um 11:36 schrieb kpi6288@xxxxxxxxx:
What can I do to improve the performance of the regular query without using a CTE?
try to rewrite it to a subselect: select ... from ... join (selec ... from ... where ...) x on ... Regards, Andreas -- 2ndQuadrant - The PostgreSQL Support Company. www.2ndQuadrant.com