dump / restore questions

Started by Joseph Shraibmanalmost 22 years ago2 messagesgeneral
Jump to latest
#1Joseph Shraibman
jks@selectacast.net

I recently dumped and restored a 7.4.2 database. It took 30 minutes for
the data to load (6 gig) and 45 for the indexes to be created (3 gig).

Why are the primary keys created after the other indexes? That means
that the table data had been evicted from the cache and has to be reloaded.

What is stored in the index files? Why do they take so long to create,
and why do they take up 50% of the space of the tables themselves?

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Joseph Shraibman (#1)
Re: dump / restore questions

Joseph Shraibman <jks@selectacast.net> writes:

I recently dumped and restored a 7.4.2 database. It took 30 minutes for
the data to load (6 gig) and 45 for the indexes to be created (3 gig).

Increasing sort_mem might help.

Why are the primary keys created after the other indexes?

AFAICS in CVS tip, they're created together.

regards, tom lane