Does adding extraneous tables in a WITH clauses slow down a query in PostgreSQL?
问题 I have a (possibly) basic question about how Postgres executes queries containing WITH clauses. I'm wondering whether including extraneous tables in a WITH clause actually slows down the query. That is, if the "temporary" table created in a WITH clause is never called outside of a WITH clause, is that "temporary" table actually created? In the first example, I am joining two "temporary" tables created using WITH clauses: --Example 1 WITH temp1 as ( SELECT * from table_1 ), temp2 as ( select *