Search Postgresql Archives

Re: [SQL] (Ab)Using schemas and inheritance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux