Re: [HACKERS] optimizer pruning problem - Mailing list pgsql-hackers

From Roberto Cornacchia
Subject Re: [HACKERS] optimizer pruning problem
Date
Msg-id 37D56459.F99B649B@tin.it
Whole thread Raw
Responses Re: [HACKERS] optimizer pruning problem
List pgsql-hackers
Thanks a lot for your explanations.
We have started working with the snapshot and have found a problem with
the selectivity estimation of join clauses, probably you just know of
this.
When the join is between attnos < 0 (such as oids), the selectivity is
estimated as 0.5 (leading to very bad size estimates), since this code
in function compute_clause_selec (clausesel.c):
 if (relid1 > 0 && relid2 > 0 && attno1 > 0 && attno2 > 0)   ... else   s1 = (Cost) (0.5);

So what is the aim of the last two and conditions?

Best regards

Roberto Cornacchia
Andrea Ghidini


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] SELECT BUG
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] optimizer pruning problem