From: | Jorge Godoy <jgodoy(at)gmail(dot)com> |
---|---|
To: | Richard Broersma Jr <rabroersma(at)yahoo(dot)com> |
Cc: | Alban Hertroys <alban(at)magproductions(dot)nl>, "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: [SQL] (Ab)Using schemas and inheritance |
Date: | 2006-05-24 17:56:43 |
Message-ID: | 200605241456.45645.jgodoy@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-sql |
Em Quarta 24 Maio 2006 14:48, Richard Broersma Jr escreveu:
>
> From what I've read I am not sure that an Index created on the base/parent
> table will help when preforming select queries on data across all of the
> children. If I interpret the "Caveats" correctly I would assume that the
> index will only apply to data that is inserted directly into the
> base/parent table.
It won't. What I was saying is that I don't need an index just for this
reason because data partitioning would be intrinsic to the inheritance
solution. I was thinking as described in
http://www.postgresql.org/docs/8.1/interactive/ddl-partitioning.html
(please, see 5.9.2, specially).
With his solution I'd need an index to have this partitioning implemented and
I'd suffer without it. With inheritance I just need this index if I'm
actually operating with dates, not to just retrieve the right data for a
given year (whatever that means ;-)).
> From the Manual:
>
> 5.8.1. Caveats
>
> ...
>
> A serious limitation of the inheritance feature is that indexes (including
> unique constraints) and foreign key constraints only apply to single
> tables, not to their inheritance children. This is true on both the
> referencing and referenced sides of a foreign key constraint.
This is why, in one of the messages, I've said that I'd have to create indices
for children tables. But hey, it is nice that you're also helping us
here :-) Thanks! :-)
--
Jorge Godoy <jgodoy(at)gmail(dot)com>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-05-24 18:54:18 | Re: challenging constraint situation - how do I make it |
Previous Message | Richard Broersma Jr | 2006-05-24 17:48:55 | Re: [SQL] (Ab)Using schemas and inheritance |
From | Date | Subject | |
---|---|---|---|
Next Message | Worky Workerson | 2006-05-24 18:50:19 | Warehouse Schema |
Previous Message | Richard Broersma Jr | 2006-05-24 17:48:55 | Re: [SQL] (Ab)Using schemas and inheritance |