Re: Suggestion for optimization - Mailing list pgsql-hackers

From Dann Corbit
Subject Re: Suggestion for optimization
Date
Msg-id D90A5A6C612A39408103E6ECDD77B82920CD1E@voyager.corporate.connx.com
Whole thread Raw
In response to Suggestion for optimization  ("Dann Corbit" <DCorbit@connx.com>)
Responses Re: Suggestion for optimization  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
List pgsql-hackers
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Friday, April 05, 2002 3:42 PM
To: Peter Bierman
Cc: Dann Corbit; pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Suggestion for optimization


Peter Bierman <bierman@apple.com> writes:
> ... Your comment: "An
> accurate cardinality figure can greatly enhance the optimizer's
> ability to perform joins in the correct order" was intriguing, and I'd
> be interested in Tom's thoughts on just that bit.

Approximate figures are quite sufficient for the planner's purposes.
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?

In extreme cases, it can mean orders of magnitude performance
difference.
<<


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Suggestion for optimization
Next
From: Fernando Nasser
Date:
Subject: Re: What's the CURRENT schema ?