Book Contents

Book Index

Next Topic

Home

Adding Custom Projections

You can use the CREATE PROJECTION command to add a projection to a database when one or more of the tables in the projection query already contains data. However, the new projection is out-of-date (not available for query processing) until you start a refresh operation. The START_REFRESH function described in the SQL Reference Manual copies data into the new projection from other projections until it becomes up-to-date.

Before starting a refresh, make sure that the projection has a sufficient number of buddy projections (call MARK_DESIGN_KSAFE) and that all nodes are up .

A refresh runs simultaneously on all nodes. During a refresh, the new projection:

You can view the progress of the refresh by monitoring the log files or calling the following functions:

When the refresh is complete, the data stored in the projection represents the table columns as of the epoch in which the refresh commits. As a result, the query optimizer may not choose the new projection for AT EPOCH queries that request historical data at epochs older than the refresh epoch of the projection..