Subject Re: Indexed Views
Author donjules2k
Anne,

Thanks for this tip very useful and simple idea. As a thought could
the engine not implement the keyword "materialized" when creating a
view and do this plumbing work in the background for you? In theory
shouldn't be too difficult as you are using parts of the engine that
already exists.

Like wise it would be nice t label a column as IDENTITY and it
automaically adds a generator and a trigger for INSERT. Just reduced
the amount of manual plumbing necessary.

--- In Firebird-Architect@yahoogroups.com, "Ann W. Harrison"
<aharrison@i...> wrote:
> At 05:17 AM 12/21/2004, donjules2k wrote:
>
>
> >Are there any plans to add indexed / materalized view? These add an
> >amazing performance gain and with SQL Server they are only available
> >in enterprise edition which means $20,000. I think this would be a
> >great asset for firebird. Any thoughts?
>
> We looked at this recently and decided that we really didn't like
> the semantics of the Oracle "materialized views" because they had
> no consistent relationship to the data in their putative sources.
>
> Firebird provides two alternatives, both of which use a base
> table, defined normally with whatever indexes are required.
>
> 1) Create a stored procedure that deletes all rows from the
> table and stores a new set, using the select statement that
> would have been included in the view definition. Run the
> stored procedure periodically. This emulates the Oracle
> semantics.
>
> 2) Create triggers on what would have been the source tables
> of the view, causing them to update the table that emulates
> the materialized view. This provides consistency between the
> "view" and its source.
>
>
>
> Ann
> www.ibphoenix.com
> We have answers.