pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alex Pilosov <alex@pilosoft.com>
To: Itai Zukerman <zukerman@math-hat.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Inheritance:  Performance & Indexes
Date: Mon, 18 Jun 2001 10:51:46 -0400 (EDT)
Message-ID: <Pine.BSO.4.10.10106181050240.19946-100000@spider.pilosoft.com> (raw)
In-Reply-To: <87k829zwq8.fsf@matt.w80.math-hat.com>

On 18 Jun 2001, Itai Zukerman wrote:

> Just curious:
> 
>   create table a (x int4 primary key);
>   create table a1 () inherits (a);
> 
>   [...]
> 
>   delete from a where x = 1000;
> 
> I take it that this is equivalent to:
> 
>   delete from only a where x = 1000;
>   delete from only a1 where x = 1000;
> 
Yes.

> In particular, for performance reasons I should try to limit the
> delete to a1 wherever possible?
Well, you should be aware what'll actually happen when you do
updates/deletes on parent table. If you mean to delete only from parent,
use 'only'.

> Also, it looks like a1 doesn't inherit the primary key index.  Is that
> intentional or a bug?
Its a problem of current implementation (aka bug)
> 
> Finally, is it possible to specify that x values be unique across
> both a *and* a1, without triggers?
Not currently, but there are talks about revamping of inheritance system,
see archives

-alex





view thread (2+ messages)

Message-ID: <Pine.BSO.4.10.10106181050240.19946-100000@spider.pilosoft.com>
Permalink:  ../Pine.BSO.4.10.10106181050240.19946-100000@spider.pilosoft.com/
Also on:    postgresql.org/message-id/Pine.BSO.4.10.10106181050240.19946-100000@spider.pilosoft.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: alex@pilosoft.com, zukerman@math-hat.com
  Subject: Re: Inheritance:  Performance & Indexes
  In-Reply-To: <Pine.BSO.4.10.10106181050240.19946-100000@spider.pilosoft.com>
  References: <87k829zwq8.fsf@matt.w80.math-hat.com> <Pine.BSO.4.10.10106181050240.19946-100000@spider.pilosoft.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