Received: from spider.pilosoft.com (p55-222.acedsl.com [160.79.55.222]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5IEfxa03068 for ; Mon, 18 Jun 2001 10:41:59 -0400 (EDT) (envelope-from alex@pilosoft.com) Received: from localhost (alexmail@localhost) by spider.pilosoft.com (8.9.3/8.9.3) with ESMTP id KAA07598; Mon, 18 Jun 2001 10:51:46 -0400 (EDT) Date: Mon, 18 Jun 2001 10:51:46 -0400 (EDT) From: Alex Pilosov To: Itai Zukerman cc: pgsql-sql@postgresql.org Subject: Re: Inheritance: Performance & Indexes In-Reply-To: <87k829zwq8.fsf@matt.w80.math-hat.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200106/254 X-Sequence-Number: 3512 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