Subject Re: [Firebird-Architect] Indexed Views
Author Ann W. Harrison
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.