Re: Suggestion for optimization - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: Suggestion for optimization
Date
Msg-id 20020406184224.B99366-100000@houston.familyhealth.com.au
Whole thread Raw
In response to Re: Suggestion for optimization  ("Dann Corbit" <DCorbit@connx.com>)
List pgsql-hackers
> AFAICS, making them exact would not improve the planning estimates
> at all, because there are too many other sources of error.  We have
> approximate stats already via vacuum/analyze statistics gathering.
> >>
> What happens if someone deletes 75% of a table?
> What happens if someone imports 30 times more rows than are already in
> the table?
> What happens if one table is remarkably small or even empty and you are
> unaware?

If you are unaware of any of the above, you'll get poorer performance.
Just make sure you run ANALYZE often enough.  Anyone who does a massive
change in the number of rows in a table, or updates most of a table should
always do an ANALYZE afterwards.

Chris




pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: RFC: Restructuring pg_aggregate
Next
From: Tom Lane
Date:
Subject: Re: RFC: Restructuring pg_aggregate