Re: Misestimate when applying condition like id = id

2020-08-20 Thread Michael Lewis
Thanks very much. I tested with a much bigger table and it seems that it is using the default .005 selectivity for this integer column. Cool. Nice to understand even if it was just a typo that had things going off the rails. And thanks for your work 3 years ago for that commit.

Re: Misestimate when applying condition like id = id

2020-08-20 Thread Tom Lane
Michael Lewis writes: > Simplified example query- > explain > select * from organizations o where id = id; > On a PG10 instance I get- > Seq Scan on organizations o (cost=0.00..4.21 ***rows=1*** width=37) > Filter: (id = id) > On a PG11 instance with the same or very very similar data, I get- >