Creating a super projection

Moderator: NorbertKrupa

Post Reply
brendon987
Newbie
Newbie
Posts: 17
Joined: Wed Sep 12, 2012 8:28 pm

Creating a super projection

Post by brendon987 » Tue Feb 12, 2013 10:04 pm

Hi all,

Simple question. If I have a table l_testtable. How do I create a super projection on this table ?

Thanks

Brendon

User avatar
Julie
Master
Master
Posts: 221
Joined: Thu Apr 19, 2012 9:29 pm

Re: Creating a super projection

Post by Julie » Wed Feb 13, 2013 2:58 am

Hi!

Here's an example from version 6.1:

Code: Select all

dbadmin=> create table t1 (c1 int, c2 varchar);
CREATE TABLE
dbadmin=> create projection t1_p as select * from t1;
CREATE PROJECTION

dbadmin=> select is_super_projection from projections where projection_name = 't1_p';
 is_super_projection
---------------------
 t
(1 row)
Pretty simple :)

But, according to the docs:
Vertica creates a default superprojection for the table. This superprojection ensures that all of the data is available for queries. However, these default superprojections might not optimize database performance, resulting in slow query performance and low data compression.

Code: Select all

dbadmin=> create table t1 (c1 int, c2 varchar);
CREATE TABLE
dbadmin=> insert into t1 values (1, 'Hi');
 OUTPUT
--------
      1
(1 row)

dbadmin=> select projection_name, is_super_projection from projections where anchor_table_name = 't1';
 projection_name | is_super_projection
-----------------+---------------------
 t1_b0           | t
 t1_b1           | t
(2 rows)
Thanks,
Juliette

Post Reply

Return to “New to Vertica”