Re: Query Performance after pg_restore

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Murthy Nunna <mnunna(at)fnal(dot)gov>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Query Performance after pg_restore
Date: 2023-12-24 16:12:15
Message-ID: 1615174.1703434335@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Murthy Nunna <mnunna(at)fnal(dot)gov> writes:
> I did pg_dump of a ~20TB database followed by pg_restore. I find simple queries like select count(*) running slow. I did a select count(*) on all tables before pg_dump which took ~4 hours. After pg_restore, same thing took 32 hours.

My bet is that that was setting commit hint bits, and hence incurring
a lot of writes. If the data is reasonably stable that's a one-time
expense.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Ribe 2023-12-24 16:27:28 Re: Timestamps in outputs
Previous Message Murthy Nunna 2023-12-24 15:53:39 Query Performance after pg_restore