Re: indexes and tables - Mailing list pgsql-general

From Alan Hodgson
Subject Re: indexes and tables
Date
Msg-id 201112190930.50298.ahodgson@simkin.ca
Whole thread Raw
In response to Re: indexes and tables  (amit sehas <cun23@yahoo.com>)
List pgsql-general
On Sunday, December 18, 2011 04:00:14 PM amit sehas wrote:
> Yes i was trying to determine how to make a View work in this situation.
> From reading the details on PostgreSQL Views are not persistent, ie they
> are just a SQL query short hand rather than actually creating any physical
> entity backing it (i would imagine that creating such a physical backing
> would be inordinately difficult to keep updated given the arbitrary
> original query that was utilized to define it...)...
>

The views are not materialized. But the SQL they execute does make use of
existing indexes.

> Is there some way inheritence can play a part in this such as
>
> a) define a base table with 3 fields and place indexes on each one of the
>    3 fields
>
> b) define the 10 types in which we just override the name of each one of
> the 3 fields (i do not know if there is such a concept as overriding the
> name of a field...) perhaps a computed field which depends upon the field
> inherited...
>
> that is as close as i could think of how to solve such as issue...but i am
> not sure how inheritance works in POstgres...

Inheritance will not help you with columns with different names. And indexes
aren't inherited anyway.

pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Feature Request: Better handling of foreign keys in DELETE statements
Next
From: Misa Simic
Date:
Subject: Re: indexes and tables