I have a simple SQL query:
SELECT * FROM table;
- a simple sequential scan - which takes me 10s.
When I add CREATE TABLE AS
(CTAS syntax) to it, i.e. my query is CREATE TABLE db_test AS SELECT * FROM table;
, the query now takes 18s.
I could not see any notable difference between the plan.
What are the steps I can take to minimize this 8s overhead? I have already tried using UNLOGGED
keyword.
Asked by Zeruno
(547 rep)
Mar 18, 2020, 11:43 AM
Last activity: Jul 9, 2025, 03:00 PM
Last activity: Jul 9, 2025, 03:00 PM