Re: truncate/create slowness - Mailing list pgsql-general

From Qingqing Zhou
Subject Re: truncate/create slowness
Date
Msg-id d2gv9u$14hm$1@news.hub.org
Whole thread Raw
In response to truncate/create slowness  (Joe Maldonado <jmaldonado@webehosting.biz>)
List pgsql-general
"Joe Maldonado" <jmaldonado@webehosting.biz> writes
> I suspect that pg_class has too many pages (49182 as below) and for
> some reason the above commands spend a lot of time updating it.
> vacuum/analyze on pg_class has not helped. Also, since the time taken
> for these commands is not consistently fast or slow, I'm puzzled.
>

Statistics (reltuples, relpages) from pg_class is not always fresh. If you
want to "reduce" the size of table, run vacuum with "full" option. Also, you
may want to examine that the time is not caused by checkpoints or locks.

Regards,
Qingqing



pgsql-general by date:

Previous
From: "Qingqing Zhou"
Date:
Subject: Re: Database monitor (again)
Next
From: "Qingqing Zhou"
Date:
Subject: Re: Triggers: using table's primary key value to update another field