Add created_at timestamp to vertica monmetrics.definitions table

This commit is contained in:
Jonathan Halterman 2014-07-29 16:07:16 -07:00
parent a38a35d6d4
commit e4d76fc3ea

View File

@ -15,9 +15,10 @@ CREATE TABLE MonMetrics.Definitions(
name VARCHAR(255) NOT NULL,
tenant_id VARCHAR(255) NOT NULL,
region VARCHAR(255) NOT NULL,
created_at TIMESTAMP NOT NULL,
PRIMARY KEY(id),
CONSTRAINT MetricsDefinitionsConstraint UNIQUE(name, tenant_id, region)
);
) PARTITION BY EXTRACT('year' FROM created_at)*10000 + EXTRACT('month' FROM created_at)*100 + EXTRACT('day' FROM created_at);
CREATE TABLE MonMetrics.Dimensions (
dimension_set_id BINARY(20) NOT NULL,
@ -59,13 +60,15 @@ CREATE PROJECTION Definitions_DBD_2_rep_MonMetrics /*+createtype(D)*/
id ENCODING RLE,
name ENCODING AUTO,
tenant_id ENCODING RLE,
region ENCODING RLE
region ENCODING RLE,
created_at ENCODING DELTAVAL
)
AS
SELECT id,
name,
tenant_id,
region
region,
created_at
FROM MonMetrics.Definitions
ORDER BY id,
tenant_id,