Re: [Proposal] Global temporary tables - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: [Proposal] Global temporary tables
Date
Msg-id CAFj8pRBTPK5UzKt3uXo=Q2AmP9PuKvgwNUj=Aod7+iyr9iLccQ@mail.gmail.com
Whole thread Raw
In response to Re: [Proposal] Global temporary tables  (Adam Brusselback <adambrusselback@gmail.com>)
List pgsql-hackers


st 2. 3. 2022 v 19:02 odesílatel Adam Brusselback <adambrusselback@gmail.com> napsal:
>In my observation, very few users require an accurate query plan for temporary tables to
perform manual analyze.

Absolutely not true in my observations or personal experience. It's one of the main reasons I have needed to use (local) temporary tables rather than just materializing a CTE when decomposing queries that are too complex for Postgres to handle.

I wish I could use GTT to avoid the catalog bloat in those instances, but that will only be possible if the query plans are accurate.

This strongly depends on usage.  Very common patterns from MSSQL don't need statistics. But on second thought, sometimes, the query should be divided and temp tables are used for storing some middle results. In this case, you cannot exist without statistics. In the first case, the temp tables can be replaced by arrays. In the second case, the temp tables are not replaceable.

Regards

Pavel

pgsql-hackers by date:

Previous
From: Joshua Brindle
Date:
Subject: Re: [PoC/RFC] Multiple passwords, interval expirations
Next
From: Bharath Rupireddy
Date:
Subject: Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs)