Projection Schema Not Same as Anchor Table Schema

Moderator: NorbertKrupa

Post Reply
beth
Intermediate
Intermediate
Posts: 58
Joined: Tue Oct 01, 2013 12:42 pm

Projection Schema Not Same as Anchor Table Schema

Post by beth » Fri Oct 31, 2014 8:31 pm

I was messing around with manually creating a projection2 and noticed that we can create them in a schema that's not the anchor table's schema. Is there any benefit to this?

Example:

Code: Select all

dbadmin=> create schema schema1;
CREATE SCHEMA
dbadmin=> create schema schema2;
CREATE SCHEMA
dbadmin=> create table schema1.test (a varchar(10));
CREATE TABLE
dbadmin=> create projection schema2.test_pr as select * from schema1.test;
CREATE PROJECTION
dbadmin=> \x
Expanded display is on.
dbadmin=> select * from projections where anchor_table_name = 'test';
-[ RECORD 1 ]------------+--------------------
projection_schema_id     | 45035996386313490
projection_schema        | schema2
projection_id            | 45035996386313494
projection_name          | test_pr
projection_basename      | test_pr
owner_id                 | 45035996273704962
owner_name               | dbadmin
anchor_table_id          | 45035996386313492
anchor_table_name        | test
node_id                  | 45035996273704980
node_name                | v_snowfall_node0001
is_prejoin               | f
created_epoch            | 325933
create_type              | CREATE PROJECTION
verified_fault_tolerance | 0
is_up_to_date            | f
has_statistics           | f
is_segmented             | f
segment_expression       |
segment_range            |
is_super_projection      | t
has_expressions          | f
is_aggregate_projection  | f
aggregate_type           |
I would think we'd need another column in the PROJECTIONS table named anchor_table_schema_name...

Post Reply

Return to “Vertica Database Administration”