Re: indexes and tables

From: Alan Hodgson <ahodgson(at)simkin(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: indexes and tables
Date: 2011-12-19 17:30:50
Message-ID: 201112190930.50298.ahodgson@simkin.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message MURAT KOÇ 2011-12-19 19:46:05 Re: Changing Passwords as Encrypted not Clear-Text
Previous Message Pavel Stehule 2011-12-19 16:58:52 Re: Feature Request: Better handling of foreign keys in DELETE statements