| From: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> |
|---|---|
| To: | pgsql-hackers(at)postgreSQL(dot)org |
| Subject: | Re: nested loop semijoin estimates |
| Date: | 2015-05-30 01:52:09 |
| Message-ID: | 556917C9.6050709@2ndquadrant.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 05/30/15 01:20, Tomas Vondra wrote:
>
> Notice the cost - it's way lover than the previous plan (9.2 vs
> ~111k), yet this plan was not chosen. So either the change broke
> something (e.g. by violating some optimizer assumption), or maybe
> there's a bug somewhere else ...
After a bit more investigation, what I think is happening here is
add_path() does not realize this is a SEMI join and a single tuple is
enough, and discards the simple indexscan path in favor of the bitmap
index scan as that seems cheaper when scanning everything.
So not really a bug, but maybe 'consider_startup' would help?
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jim Nasby | 2015-05-30 02:30:57 | Re: [Proposal] More Vacuum Statistics |
| Previous Message | Andres Freund | 2015-05-30 01:46:28 | Re: [HACKERS] Re: 9.4.1 -> 9.4.2 problem: could not access status of transaction 1 |