pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Inheritance: Performance & Indexes 2+ messages / 2 participants [nested] [flat]
* Inheritance: Performance & Indexes @ 2001-06-18 14:30 Itai Zukerman <zukerman@math-hat.com> 0 siblings, 1 reply; 2+ messages in thread From: Itai Zukerman @ 2001-06-18 14:30 UTC (permalink / raw) To: pgsql-sql 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/; ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Inheritance: Performance & Indexes @ 2001-06-18 14:51 Alex Pilosov <alex@pilosoft.com> parent: Itai Zukerman <zukerman@math-hat.com> 0 siblings, 0 replies; 2+ messages in thread From: Alex Pilosov @ 2001-06-18 14:51 UTC (permalink / raw) To: Itai Zukerman <zukerman@math-hat.com>; +Cc: 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 ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2001-06-18 14:51 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2001-06-18 14:30 Inheritance: Performance & Indexes Itai Zukerman <zukerman@math-hat.com> 2001-06-18 14:51 ` Alex Pilosov <alex@pilosoft.com>
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