pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Itai Zukerman <zukerman@math-hat.com>
To: pgsql-sql@postgresql.org
Subject: Inheritance:  Performance & Indexes
Date: 18 Jun 2001 10:30:39 -0400
Message-ID: <87k829zwq8.fsf@matt.w80.math-hat.com> (raw)

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;

In particular, for performance reasons I should try to limit the
delete to a1 wherever possible?

Also, it looks like a1 doesn't inherit the primary key index.  Is that
intentional or a bug?

Finally, is it possible to specify that x values be unique across
both a *and* a1, without triggers?

-- 
Itai Zukerman  <http://www.math-hat.com/~zukerman/;



view thread (2+ messages)  latest in thread

Message-ID: <87k829zwq8.fsf@matt.w80.math-hat.com>
Permalink:  ../87k829zwq8.fsf@matt.w80.math-hat.com/
Also on:    postgresql.org/message-id/87k829zwq8.fsf@matt.w80.math-hat.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-sql@postgresql.org
  Cc: zukerman@math-hat.com
  Subject: Re: Inheritance:  Performance & Indexes
  In-Reply-To: <87k829zwq8.fsf@matt.w80.math-hat.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