Re: [HACKERS] optimizer pruning problem

From: Roberto Cornacchia <rcorna(at)tin(dot)it>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] optimizer pruning problem
Date: 1999-09-07 19:15:37
Message-ID: 37D56459.F99B649B@tin.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-09-07 21:26:06 Re: [HACKERS] optimizer pruning problem
Previous Message Bruce Momjian 1999-09-07 15:39:56 Re: [HACKERS] SELECT BUG