Re: Indexes on inheriting tables

From: Toby Corkindale <toby(dot)corkindale(at)strategicdata(dot)com(dot)au>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Indexes on inheriting tables
Date: 2011-08-25 01:57:03
Message-ID: 4E55ABEF.105@strategicdata.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 25/08/11 11:34, Shoaib Mir wrote:
> On Thu, Aug 25, 2011 at 11:17 AM, Toby Corkindale
> <toby(dot)corkindale(at)strategicdata(dot)com(dot)au
> <mailto:toby(dot)corkindale(at)strategicdata(dot)com(dot)au>> wrote:
>
>
> Do I need to make sure I re-create every index on every child table
> I create?
> That would be.. annoying, at best.
>
> Is there a way to enable inheritance of indexes too?
>
>
> You do not need an index on the master table so create indexes on child
> tables only. This way you are avoiding big index scans and only looking
> at the index on the data you are interested in (child table).

Ah, but I'd rather not maintain all those extra indexes!
Say I want to add a new index - now I'd need to go through and add it to
a hundred tables! I guess I can script it.. but it doesn't seem good.

It seems messy to inherit the columns but not the indexes or checks upon
them :(

Toby

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shoaib Mir 2011-08-25 02:10:36 Re: Indexes on inheriting tables
Previous Message Shoaib Mir 2011-08-25 01:34:27 Re: Indexes on inheriting tables