You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hbyd_ueba/sql/pg_struct.sql

26 lines
812 B

3 months ago
CREATE SCHEMA if not exists ueba_analysis_schema;
CREATE TABLE if not EXISTS ueba_analysis_schema.logs (
id SERIAL,
menu VARCHAR(50),
interface VARCHAR(300),
3 months ago
ip INET,
account VARCHAR(30),
jobnum VARCHAR(30),
3 months ago
count int,
logdate date NOT NULL,
company VARCHAR(30),
3 months ago
data_type int)
PARTITION BY RANGE (logdate);
CREATE TABLE if not EXISTS ueba_analysis_schema.jobs (
job_id VARCHAR(50),
start_time TIMESTAMP ,
end_time TIMESTAMP ,
status int,
run_count int,
created_at TIMESTAMP DEFAULT NOW(),
complate_time TIMESTAMP,
err text
);
CREATE INDEX if not exists idx_logdate_data_type ON ueba_analysis_schema.logs (logdate,data_type);
3 months ago
CREATE INDEX if not exists idx_job_id ON ueba_analysis_schema.jobs (job_id);