On Fr, 2007-07-20 at 16:12 +0200, Steffen Schwigon wrote:
> "Beaudet, David P." <D-Beaudet NGA.GOV> writes:
> > Have you vacuumed your DB lately?
>
> I'm not sure what vacuumed means? Emptied or cleared?
VACUUM physically removes deleted rows from the storage
system and
updates the query planner statistics.
> I occasionally dump/restore it from another Bric
instance.
>
> Do you have a hint in mind?
I had an similar issue with another postgres database in
another
project. I generated some test data (usually around 1
million rows each
test run), cleared (not deleted!) the table and made another
test run.
The issue appearing was, that postgres isn't deleting the
rows
physicaly, it just marks them as deleted (which led to the
side effect
that the estimated row count in pgadmin III increased by 1
million with
each test run). So the table became slower and slower with
each test run
until i deleted and recreated it after each simple select
for the
primary key went for minutes.
Maybe you have similar problem here if you often
delete/insert lots of
rows into the same table.
Try vacuuming the table and delete the whole table instead
of all
records in it if you do a dump/restore.
>
> GreetinX
> Steffen
Greetings,
Johannes
|