From: | Alex Pilosov <alex(at)pilosoft(dot)com> |
---|---|
To: | Itai Zukerman <zukerman(at)math-hat(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Inheritance: Performance & Indexes |
Date: | 2001-06-18 14:51:46 |
Message-ID: | Pine.BSO.4.10.10106181050240.19946-100000@spider.pilosoft.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Ilan Fait | 2001-06-18 15:02:54 | How to build a TRIGGER in POSTGERSQL |
Previous Message | Ilan Fait | 2001-06-18 14:35:42 | How to build a TRIGGER in POSTGERSQL |