Top N queries and disbursion - Mailing list pgsql-hackers

From Roberto Cornacchia
Subject Top N queries and disbursion
Date
Msg-id 37FCDCA9.219C3FB8@tin.it
Whole thread Raw
In response to Re: [HACKERS] optimizer pruning problem  (Roberto Cornacchia <rcorna@tin.it>)
Responses Re: Top N queries and disbursion
List pgsql-hackers
We have finished our work on optimization of Top N queries (with clauses
STOP AFTER ... FOR EACH ... RANK BY ...) now it's time of validating it
with performance tests: since we are working on snapshots of the 6.6
release (now we are using snapshot dated 9/13/99) we are afraid of
instability problems to affect the results. Could you give us any
suggestion about this? We are quite close to the degree day, so we have
to optimize time usage... 
BTW, first results seem to be interesting.

We would ask you for a last thing.
We need to estimate the number of distinct values of an attribute. We
thought 1/disbursion was the right solution, but the results were quite
wrong:
with 100 distinct values of an attribute uniformly distribuited in a
relation of 10000 tuples, disbursion was estimated as 0.002275, giving
us 440 distinct values. We have seen this disbursion estimates
result also in bad join selectivities estimate.
Could this be due to a bad disbursion estimate or is our solution
completely wrong?
Thanks a lot

Roberto Cornacchia
Andrea Ghidini


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Re: psql and comments
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Re: psql and comments