Exporting the Optimized Database
After you optimize the database using Database Designer and other techniques, verify that the optimized projections are available for all customers in the deployed database.
The following Vertica functions generate scripts that create the database on the customer's cluster:
- EXPORT_CATALOG—Generates a SQL script that re-creates a physical schema design in its current state on a different cluster.
- EXPORT_OBJECTS—Generates a SQL script that re-creates on a different cluster all the non-virtual objects to which you have access. Running the generated SQL script on another cluster creates all referenced objects before their dependent objects.
- EXPORT_TABLES—Generates a SQL script that re-creates a logical schema on a different cluster. This logical schema includes schemas, tables, constraints, and view.
After you have created these scripts, edit them as follows:
- Modify the CREATE PROJECTION statements to include the appropriate segmentation clauses.
- Modify the CREATE PROJECTION statements to specify ALL NODES KSAFE <value>. As a result, all unsegmented projections are replicated on all nodes, with the designated K-safety value. If you don’t specify a K-safety value, Vertica uses the current K-safety value, or 1.