pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Petr Jelinek <petr@2ndquadrant.com>
To: Bruce Momjian <bruce@momjian.us>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: Pavan Deolasee <pavan.deolasee@gmail.com>
Cc: Alexander Korotkov <a.korotkov@postgrespro.ru>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Indirect indexes
Date: Thu, 20 Oct 2016 17:34:41 +0200
Message-ID: <f3384383-ab2f-bc0c-c938-88e61e95fd1b@2ndquadrant.com> (raw)
In-Reply-To: <20161020152440.GB18972@momjian.us>
References: <20161018182843.xczrxsa2yd47pnru@alvherre.pgsql>
	<CA+TgmoajGNsjTg7B3KjdpuDEuaOiMXWoh6ewc9jkhuCuv2deFQ@mail.gmail.com>
	<CAPpHfdseka0Vmukp9SRKgGDdGb7pYDcn-iWGqFv1a0R9em2anQ@mail.gmail.com>
	<CABOikdM2FpKs813oxfCXeAYR5SiK8V9-x8o7Y1zZpD_-Oso7BQ@mail.gmail.com>
	<20161019164043.GN5087@momjian.us>
	<CANP8+j+ERoVPn6gFevWqm6U=SGAeg3JhCASpLDLysKnUeViujg@mail.gmail.com>
	<20161019170416.GR5087@momjian.us>
	<20161020122937.GA28621@momjian.us>
	<13500012-c20a-1fc4-5a57-054c9aeb4e25@2ndquadrant.com>
	<20161020152440.GB18972@momjian.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 20/10/16 17:24, Bruce Momjian wrote:
> On Thu, Oct 20, 2016 at 05:14:51PM +0200, Petr Jelinek wrote:
>>> Also, it seems indirect indexes would be useful for indexing columns
>>> that are not updated frequently on tables that are updated frequently,
>>> and whose primary key is not updated frequently.  That's quite a logic
>>> problem for users to understand.
>>>
>>
>> Which covers like 99.9% of problematic cases I see on daily basis.
>>
>> And by that logic we should not have indexes at all, they are not
>> automatically created and user needs to think about if they need them or
>> not.
> 
> Do you have to resort to extreme statements to make your point?  The use
> of indexes is clear to most users, while the use of indirect indexes
> would not be, as I stated earlier.
> 

Not extreme statement just pointing flaw in that logic. People need to
understand same limitation for example when using most of current
trigger-based replication systems as they don't support pkey updates.
And no, many users don't know when to use indexes and which one is most
appropriate even though indexes have been here for decades.

The fact that some feature is not useful for everybody never stopped us
from adding it before, especially when it can be extremely useful to some.

-- 
  Petr Jelinek                  http://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (61+ messages)  latest in thread

Message-ID: <f3384383-ab2f-bc0c-c938-88e61e95fd1b@2ndquadrant.com>
Permalink:  ../f3384383-ab2f-bc0c-c938-88e61e95fd1b@2ndquadrant.com/
Also on:    postgresql.org/message-id/f3384383-ab2f-bc0c-c938-88e61e95fd1b@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: petr@2ndquadrant.com, bruce@momjian.us, simon@2ndquadrant.com, pavan.deolasee@gmail.com, a.korotkov@postgrespro.ru, robertmhaas@gmail.com, alvherre@2ndquadrant.com
  Subject: Re: Indirect indexes
  In-Reply-To: <f3384383-ab2f-bc0c-c938-88e61e95fd1b@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox