| From: | Jaime Casanova <jaime(dot)casanova(at)2ndquadrant(dot)com> |
|---|---|
| To: | Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com> |
| Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Invisible Indexes |
| Date: | 2018-06-18 21:46:02 |
| Message-ID: | CAJGNTeMab_t_TkPgbVzfA0PHGdCxFnqB4jY0GW1ND+LFQT2wLA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 18 June 2018 at 16:36, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com> wrote:
>
> This is a MySQL feature, where an index is not considered by the planner.
> Implementing it should be fairly straightforward, adding a new boolean to
> pg_index, and options to CREATE INDEX and ALTER INDEX. I guess VISIBLE would
> become a new unreserved keyword.
>
> The most obvious use case is to see what the planner does when the index is
> not visible, for example which other index(es) it might use. There are
> probably other cases where we might want an index to enforce a constraint
> but not to be used in query planning.
>
> So, do we want this feature? If we do I'll go ahead and prepare a patch.
>
should pg_index.indisvalid works for this? in that case you only need
the syntax for it...
--
Jaime Casanova www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2018-06-18 21:48:05 | Re: Transform for pl/perl |
| Previous Message | Peter Geoghegan | 2018-06-18 21:44:29 | Re: Invisible Indexes |