Changeset 77e875df87c94f8cd2b8fbc32fbe360623e759b8

Show
Ignore:
Timestamp:
09/30/09 16:14:10 (5 years ago)
Author:
Robert Treat <robert@omniti.com>
git-committer:
Robert Treat <robert@omniti.com> 1254327250 +0000
git-parent:

[88d5aaab122fefd6471e1d4604f54cd1a6df433b]

git-author:
Robert Treat <robert@omniti.com> 1254327250 +0000
Message:

adding schema for rollup tables, with array based storage

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sql/tables/noit.metric_numeric_rollup_12hours.sql

    ra34bc12 r77e875d  
    1 -- formerly rollup_matrix_numeric_12hours 
     1-- formerly rollup_matrix_numeric_12hours  
     2-- 
     3-- PostgreSQL database dump 
     4-- 
     5 
     6SET client_encoding = 'UTF8'; 
     7SET standard_conforming_strings = off; 
     8SET check_function_bodies = false; 
     9SET client_min_messages = warning; 
     10SET escape_string_warning = off; 
     11 
     12SET search_path = noit, pg_catalog; 
     13 
     14SET default_tablespace = ''; 
     15 
     16SET default_with_oids = false; 
     17 
     18-- 
     19-- Name: metric_numeric_rollup_12hours; Type: TABLE; Schema: noit; Owner: reconnoiter; Tablespace:  
     20-- 
     21 
     22CREATE TABLE metric_numeric_rollup_12hours ( 
     23    sid integer NOT NULL, 
     24    name text NOT NULL, 
     25    rollup_time timestamp with time zone NOT NULL, 
     26    count_rows integer[], 
     27    avg_value numeric[], 
     28    counter_dev numeric[], 
     29    CONSTRAINT metric_numeric_rollup_12hours_rollup_time_check CHECK (((date_part('hour'::text, timezone('UTC'::text, rollup_time)) = ANY (ARRAY[(0)::double precision, (12)::double precision])) AND (date_part('minute'::text, timezone('utc'::text, rollup_time)) = (0)::double precision))) 
     30); 
     31 
     32 
     33ALTER TABLE noit.metric_numeric_rollup_12hours OWNER TO reconnoiter; 
     34 
     35-- 
     36-- Name: metric_numeric_rollup_12hours_pkey; Type: CONSTRAINT; Schema: noit; Owner: reconnoiter; Tablespace:  
     37-- 
     38 
     39ALTER TABLE ONLY metric_numeric_rollup_12hours 
     40    ADD CONSTRAINT metric_numeric_rollup_12hours_pkey PRIMARY KEY (rollup_time, sid, name); 
     41 
     42 
     43-- 
     44-- Name: metric_numeric_rollup_12hours; Type: ACL; Schema: noit; Owner: reconnoiter 
     45-- 
     46 
     47REVOKE ALL ON TABLE metric_numeric_rollup_12hours FROM PUBLIC; 
     48REVOKE ALL ON TABLE metric_numeric_rollup_12hours FROM reconnoiter; 
     49GRANT ALL ON TABLE metric_numeric_rollup_12hours TO reconnoiter; 
     50GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE metric_numeric_rollup_12hours TO stratcon; 
     51GRANT SELECT ON TABLE metric_numeric_rollup_12hours TO prism; 
     52 
     53 
     54-- 
     55-- PostgreSQL database dump complete 
     56-- 
     57 
  • sql/tables/noit.metric_numeric_rollup_20m.sql

    ra34bc12 r77e875d  
    1 -- formerly rollup_matrix_numberic_20m 
     1-- formerly rollup_matrix_numeric_20m 
     2-- 
     3-- PostgreSQL database dump 
     4-- 
     5 
     6SET client_encoding = 'UTF8'; 
     7SET standard_conforming_strings = off; 
     8SET check_function_bodies = false; 
     9SET client_min_messages = warning; 
     10SET escape_string_warning = off; 
     11 
     12SET search_path = noit, pg_catalog; 
     13 
     14SET default_tablespace = ''; 
     15 
     16SET default_with_oids = false; 
     17 
     18-- 
     19-- Name: metric_numeric_rollup_20m; Type: TABLE; Schema: noit; Owner: reconnoiter; Tablespace:  
     20-- 
     21 
     22CREATE TABLE metric_numeric_rollup_20m ( 
     23    sid integer NOT NULL, 
     24    name text NOT NULL, 
     25    rollup_time timestamp with time zone NOT NULL, 
     26    count_rows integer[], 
     27    avg_value numeric[], 
     28    counter_dev numeric[] 
     29); 
     30 
     31 
     32ALTER TABLE noit.metric_numeric_rollup_20m OWNER TO reconnoiter; 
     33 
     34-- 
     35-- Name: metric_numeric_rollup_20m_new_pkey; Type: CONSTRAINT; Schema: noit; Owner: reconnoiter; Tablespace:  
     36-- 
     37 
     38ALTER TABLE ONLY metric_numeric_rollup_20m 
     39    ADD CONSTRAINT metric_numeric_rollup_20m_pkey PRIMARY KEY (rollup_time, sid, name); 
     40 
     41 
     42-- 
     43-- Name: metric_numeric_rollup_20m_rollup_time_idx; Type: INDEX; Schema: noit; Owner: reconnoiter; Tablespace:  
     44-- 
     45 
     46CREATE INDEX metric_numeric_rollup_20m_rollup_time_idx ON metric_numeric_rollup_20m USING btree (date_hour(rollup_time)); 
     47 
     48 
     49-- 
     50-- Name: metric_numeric_rollup_20m; Type: ACL; Schema: noit; Owner: reconnoiter 
     51-- 
     52 
     53REVOKE ALL ON TABLE metric_numeric_rollup_20m FROM PUBLIC; 
     54REVOKE ALL ON TABLE metric_numeric_rollup_20m FROM reconnoiter; 
     55GRANT ALL ON TABLE metric_numeric_rollup_20m TO reconnoiter; 
     56GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE metric_numeric_rollup_20m TO stratcon; 
     57GRANT SELECT ON TABLE metric_numeric_rollup_20m TO prism; 
     58 
     59 
     60-- 
     61-- PostgreSQL database dump complete 
     62-- 
     63 
  • sql/tables/noit.metric_numeric_rollup_60m.sql

    ra34bc12 r77e875d  
    1 -- formerly rollup_matrix_numberic_60m  
     1-- formerly rollup_matrix_numeric_60m  
     2-- 
     3-- PostgreSQL database dump 
     4-- 
     5 
     6SET client_encoding = 'UTF8'; 
     7SET standard_conforming_strings = off; 
     8SET check_function_bodies = false; 
     9SET client_min_messages = warning; 
     10SET escape_string_warning = off; 
     11 
     12SET search_path = noit, pg_catalog; 
     13 
     14SET default_tablespace = ''; 
     15 
     16SET default_with_oids = false; 
     17 
     18-- 
     19-- Name: metric_numeric_rollup_60m; Type: TABLE; Schema: noit; Owner: reconnoiter; Tablespace:  
     20-- 
     21 
     22CREATE TABLE metric_numeric_rollup_60m ( 
     23    sid integer NOT NULL, 
     24    name text NOT NULL, 
     25    rollup_time timestamp with time zone NOT NULL, 
     26    count_rows integer[], 
     27    avg_value numeric[], 
     28    counter_dev numeric[] 
     29); 
     30 
     31 
     32ALTER TABLE noit.metric_numeric_rollup_60m OWNER TO reconnoiter; 
     33 
     34-- 
     35-- Name: metric_numeric_rollup_60m_pkey; Type: CONSTRAINT; Schema: noit; Owner: reconnoiter; Tablespace:  
     36-- 
     37 
     38ALTER TABLE ONLY metric_numeric_rollup_60m 
     39    ADD CONSTRAINT metric_numeric_rollup_60m_pkey PRIMARY KEY (rollup_time, sid, name); 
     40 
     41 
     42-- 
     43-- Name: metric_numeric_rollup_60m; Type: ACL; Schema: noit; Owner: reconnoiter 
     44-- 
     45 
     46REVOKE ALL ON TABLE metric_numeric_rollup_60m FROM PUBLIC; 
     47REVOKE ALL ON TABLE metric_numeric_rollup_60m FROM reconnoiter; 
     48GRANT ALL ON TABLE metric_numeric_rollup_60m TO reconnoiter; 
     49GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE metric_numeric_rollup_60m TO stratcon; 
     50GRANT SELECT ON TABLE metric_numeric_rollup_60m TO prism; 
     51 
     52 
     53-- 
     54-- PostgreSQL database dump complete 
     55-- 
     56 
  • sql/tables/noit.metric_numeric_rollup_6hours.sql

    ra34bc12 r77e875d  
    1 -- formerly rollup_matrix_numeric_6hours 
     1-- formerly rollup_matrix_numeric_6hours  
     2-- 
     3-- PostgreSQL database dump 
     4-- 
     5 
     6SET client_encoding = 'UTF8'; 
     7SET standard_conforming_strings = off; 
     8SET check_function_bodies = false; 
     9SET client_min_messages = warning; 
     10SET escape_string_warning = off; 
     11 
     12SET search_path = noit, pg_catalog; 
     13 
     14SET default_tablespace = ''; 
     15 
     16SET default_with_oids = false; 
     17 
     18-- 
     19-- Name: metric_numeric_rollup_6hours; Type: TABLE; Schema: noit; Owner: reconnoiter; Tablespace:  
     20-- 
     21 
     22CREATE TABLE metric_numeric_rollup_6hours ( 
     23    sid integer NOT NULL, 
     24    name text NOT NULL, 
     25    rollup_time timestamp with time zone NOT NULL, 
     26    count_rows integer[], 
     27    avg_value numeric[], 
     28    counter_dev numeric[], 
     29    CONSTRAINT metric_numeric_rollup_6hours_rollup_time_check CHECK (((date_part('hour'::text, timezone('UTC'::text, rollup_time)) = ANY (ARRAY[(0)::double precision, (6)::double precision, (12)::double precision, (18)::double precision])) AND (date_part('minute'::text, timezone('utc'::text, rollup_time)) = (0)::double precision))) 
     30); 
     31 
     32 
     33ALTER TABLE noit.metric_numeric_rollup_6hours OWNER TO reconnoiter; 
     34 
     35-- 
     36-- Name: metric_numeric_rollup_6hours_pkey; Type: CONSTRAINT; Schema: noit; Owner: reconnoiter; Tablespace:  
     37-- 
     38 
     39ALTER TABLE ONLY metric_numeric_rollup_6hours 
     40    ADD CONSTRAINT metric_numeric_rollup_6hours_pkey PRIMARY KEY (rollup_time, sid, name); 
     41 
     42-- 
     43-- Name: metric_numeric_rollup_6hours; Type: ACL; Schema: noit; Owner: reconnoiter 
     44-- 
     45 
     46REVOKE ALL ON TABLE metric_numeric_rollup_6hours FROM PUBLIC; 
     47REVOKE ALL ON TABLE metric_numeric_rollup_6hours FROM reconnoiter; 
     48GRANT ALL ON TABLE metric_numeric_rollup_6hours TO reconnoiter; 
     49GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE metric_numeric_rollup_6hours TO stratcon; 
     50GRANT SELECT ON TABLE metric_numeric_rollup_6hours TO prism; 
     51 
     52 
     53-- 
     54-- PostgreSQL database dump complete 
     55-- 
     56