Using CTE vs temporary tables - Mailing list pgsql-general

From hmidi slim
Subject Using CTE vs temporary tables
Date
Msg-id CAMsqVxv2OuK0YBh7zNfz8tNwaxXGu2ih+DC6D_2Z8=Zt-EjgkQ@mail.gmail.com
Whole thread Raw
Responses Re: Using CTE vs temporary tables  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: Using CTE vs temporary tables  (Ravi Krishna <sravikrishna3@gmail.com>)
List pgsql-general
Hi,
I have a big query that used about 15 cte and its execution time is acceptable. I'm trying to optimize my query because it contains about 150 lines of code and becomes hard to understand it and add new filter or condition easily.
I think to change some cte with temporary tables and using indexes. I found this answer about performance between CTE and temp tables:

Any suggestion will be welcome.
Best regards.

pgsql-general by date:

Previous
From: Mathieu Fenniak
Date:
Subject: Optimizing execution of expensive subqueries
Next
From: "David G. Johnston"
Date:
Subject: Re: Using CTE vs temporary tables