When you create a table, by default Vertica creates a super
projection consisting of all columns.
CREATE TABLE
public.sales(
sales_id int NOT NULL,
code varchar(20) NOT NULL,
quantity int,
amount numeric(18,4),
product_id int,
sales_date timestamp);
sales_id int NOT NULL,
code varchar(20) NOT NULL,
quantity int,
amount numeric(18,4),
product_id int,
sales_date timestamp);
ALTER TABLE
public.sales ADD CONSTRAINT pk_sales PRIMARY KEY (sales_id, code);
SELECT ps.node_name,p.projection_name,
row_count, p.is_super_projection
FROM projection_storage PS
join projections p ON
p.projection_name=ps.projection_name
WHERE
ps.anchor_table_name='sales' and p. projection_basename='sales'
ORDER BY p.projection_name
,ps.node_name;
As k safe =1, Vertica creates 2 super projections (_b0 and _b1) and distributes evenly across available nodes.
Check in projection_columns tables for the columns inside a projection.
No comments:
Post a Comment