Different table sizes after duplicate tables?

Viewed 38

I duplicated my table with:

CREATE TABLE table2 AS SELECT * FROM table1;

I'm checking the sizes of thee 2 tables:

SELECT pg_size_pretty( pg_total_relation_size('table1'));

SELECT pg_size_pretty( pg_total_relation_size('table2'));

But I'm getting different sizes (size(table1) > size(table2)).

size table1 = 2064MB

size table2 = 821MB

How can it be ? Can I be sure that all the data from table1 was duplicated into table2 ?

0 Answers
Related