From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Tomasz Ostrowski <tometzky+pg(at)ato(dot)waw(dot)pl>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Multicolumn hash indexes |
Date: | 2017-09-27 15:32:37 |
Message-ID: | CA+TgmoZjeMZ74KKVRmRW=usKsPv5_RyJYiwE_wReyGThVFkEXw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Sep 26, 2017 at 11:32 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> There is a facility in the planner to require a condition for the first
> column of an index before considering an indexscan plan. We could perhaps
> extend that to require a condition for each column of the index, though
> I'm not sure how much work is involved directly in that. The bigger
> picture here though is that it puts a premium on *not* throwing away
> "unnecessary" qual conditions, which is directly antithetical to a bunch
> of other planner goals.
>
> User: Why won't the planner use my multicolumn hash index?
> I have query conditions constraining all the columns!
> Us: Well, one of your conditions was discarded because it was
> constant-true after constant simplification, or redundant with
> a partition qual or CHECK constraint, or implied by an index
> predicate, or treated as a join condition instead of a
> restriction condition, or absorbed into an equivalence class
> and then the planner chose to emit some other equivalence
> condition instead, or possibly two or three other things.
> User: WAAAAH!
Ah. Yeah, that's a problem.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Nico Williams | 2017-09-27 15:33:59 | Re: Multicolumn hash indexes |
Previous Message | Robert Haas | 2017-09-27 15:30:28 | Re: Binary search in fmgr_isbuiltin() is a bottleneck. |