Keep the Predefined Projection in Queries

Using projections can improve performance of SQL queries running in Vertica. Based on the query and projections available for the referenced tables, the Vertica engine selects the best available projection to stream data from.

Do not override the projection that the Vertica engine selected. Do not hardcode the projection name into the query. Doing so may make it impossible for GoodData to fully operate your Data Warehouse instance.

For example:

CREATE TABLE test_table(x int, y int);
CREATE PROJECTION test_projection1(x) AS SELECT x FROM test_table;
CREATE PROJECTION test_projection2(y) AS SELECT y FROM test_table;

-- This is not recommended:
SELECT x FROM test_projection1;

-- Let the Vertica engine decide what projection is the best suitable projection (in this case, it is "test_projection1"):
SELECT x FROM test_table;