security_event和proxy_event添加order by common_namespace_id

This commit is contained in:
houjinchuan
2022-08-01 14:14:15 +08:00
parent ffdef6afd5
commit fb2d3e298f
2 changed files with 4 additions and 4 deletions

View File

@@ -2238,7 +2238,7 @@ CREATE TABLE IF NOT EXISTS tsg_galaxy_v3.security_event_local ON CLUSTER ck_clus
rdp_security_protocol String,
rdp_cookie String
)
ENGINE = MergeTree PARTITION BY toYYYYMMDD(toDate(common_recv_time)) ORDER BY (common_log_id,common_policy_id,common_recv_time);
ENGINE = MergeTree PARTITION BY toYYYYMMDD(toDate(common_recv_time)) ORDER BY (common_log_id,common_policy_id,common_recv_time,common_namespace_id);
CREATE TABLE IF NOT EXISTS tsg_galaxy_v3.proxy_event_local ON CLUSTER ck_cluster(
common_recv_time Int64,
@@ -2401,7 +2401,7 @@ CREATE TABLE IF NOT EXISTS tsg_galaxy_v3.proxy_event_local ON CLUSTER ck_cluster
rdp_security_protocol String,
rdp_cookie String
)
ENGINE = MergeTree PARTITION BY toYYYYMMDD(toDate(common_recv_time)) ORDER BY (common_log_id,common_policy_id,common_recv_time);
ENGINE = MergeTree PARTITION BY toYYYYMMDD(toDate(common_recv_time)) ORDER BY (common_log_id,common_policy_id,common_recv_time,common_namespace_id);
CREATE TABLE IF NOT EXISTS tsg_galaxy_v3.session_record_local ON CLUSTER ck_cluster(

View File

@@ -6,11 +6,11 @@ ALTER table tsg_galaxy_v3.interim_session_record_local on cluster ck_cluster ad
ALTER table tsg_galaxy_v3.interim_session_record on cluster ck_cluster add column IF NOT EXISTS common_namespace_id Int64 after common_user_region;
ALTER table tsg_galaxy_v3.interim_session_record on cluster ck_query add column IF NOT EXISTS common_namespace_id Int64 after common_user_region;
ALTER table tsg_galaxy_v3.security_event_local on cluster ck_cluster add column IF NOT EXISTS common_namespace_id Int64 after common_user_region;
ALTER table tsg_galaxy_v3.security_event_local on cluster ck_cluster add column IF NOT EXISTS common_namespace_id Int64 after common_user_region,MODIFY order by (common_log_id,common_policy_id,common_recv_time,common_namespace_id);
ALTER table tsg_galaxy_v3.security_event on cluster ck_cluster add column IF NOT EXISTS common_namespace_id Int64 after common_user_region;
ALTER table tsg_galaxy_v3.security_event on cluster ck_query add column IF NOT EXISTS common_namespace_id Int64 after common_user_region;
ALTER table tsg_galaxy_v3.proxy_event_local on cluster ck_cluster add column IF NOT EXISTS common_namespace_id Int64 after common_user_region;
ALTER table tsg_galaxy_v3.proxy_event_local on cluster ck_cluster add column IF NOT EXISTS common_namespace_id Int64 after common_user_region,MODIFY order by (common_log_id,common_policy_id,common_recv_time,common_namespace_id);
ALTER table tsg_galaxy_v3.proxy_event on cluster ck_cluster add column IF NOT EXISTS common_namespace_id Int64 after common_user_region;
ALTER table tsg_galaxy_v3.proxy_event on cluster ck_query add column IF NOT EXISTS common_namespace_id Int64 after common_user_region;