From 777797beedfef5aac24ea33f6224e839419766de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=9A=E5=B2=B1=E6=9D=B0?= Date: Mon, 4 Jul 2022 03:08:41 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9session=E5=AD=97=E8=A1=A8comm?= =?UTF-8?q?on=5Fdirection=E5=AD=97=E6=AE=B5=E7=B1=BB=E5=9E=8B=E4=B8=BANull?= =?UTF-8?q?able(Int64)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Clickhouse_建表语句_测试环境.sql | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/Clickhouse最新全量建表语句/Clickhouse_建表语句_测试环境.sql b/Clickhouse最新全量建表语句/Clickhouse_建表语句_测试环境.sql index 8443a3c..b44a1dd 100644 --- a/Clickhouse最新全量建表语句/Clickhouse_建表语句_测试环境.sql +++ b/Clickhouse最新全量建表语句/Clickhouse_建表语句_测试环境.sql @@ -2759,7 +2759,7 @@ CREATE TABLE IF NOT EXISTS tsg_galaxy_v3.session_record_common_client_ip_local O common_client_port Int64, common_server_port Int64, common_app_label LowCardinality(String), - common_direction Int64 + common_direction Nullable(Int64) ) ENGINE=MergeTree PARTITION BY toYYYYMMDD(toDate(common_recv_time)) ORDER BY (common_client_ip,common_server_ip,common_recv_time); @@ -2780,7 +2780,7 @@ CREATE TABLE IF NOT EXISTS tsg_galaxy_v3.session_record_common_server_ip_local O common_client_port Int64, common_server_port Int64, common_app_label LowCardinality(String), - common_direction Int64 + common_direction Nullable(Int64) ) ENGINE=MergeTree PARTITION BY toYYYYMMDD(toDate(common_recv_time)) ORDER BY (common_server_ip,common_client_ip,common_recv_time); @@ -2801,7 +2801,7 @@ CREATE TABLE IF NOT EXISTS tsg_galaxy_v3.session_record_http_domain_local ON CLU common_client_port Int64, common_server_port Int64, common_app_label LowCardinality(String), - common_direction Int64 + common_direction Nullable(Int64) ) ENGINE=MergeTree PARTITION BY toYYYYMMDD(toDate(common_recv_time)) ORDER BY (http_domain,common_recv_time); @@ -4555,7 +4555,7 @@ CREATE TABLE IF NOT EXISTS tsg_galaxy_v3.session_record_common_client_ip ON CLUS common_client_port Int64, common_server_port Int64, common_app_label LowCardinality(String), - common_direction Int64 + common_direction Nullable(Int64) ) ENGINE =Distributed(ck_cluster,tsg_galaxy_v3,session_record_common_client_ip_local,rand()); CREATE TABLE IF NOT EXISTS tsg_galaxy_v3.session_record_common_server_ip ON CLUSTER ck_cluster( @@ -4573,7 +4573,7 @@ CREATE TABLE IF NOT EXISTS tsg_galaxy_v3.session_record_common_server_ip ON CLUS common_client_port Int64, common_server_port Int64, common_app_label LowCardinality(String), - common_direction Int64 + common_direction Nullable(Int64) ) ENGINE =Distributed(ck_cluster,tsg_galaxy_v3,session_record_common_server_ip_local,rand()); @@ -4592,7 +4592,7 @@ CREATE TABLE IF NOT EXISTS tsg_galaxy_v3.session_record_http_domain ON CLUSTER c common_client_port Int64, common_server_port Int64, common_app_label LowCardinality(String), - common_direction Int64 + common_direction Nullable(Int64) ) ENGINE =Distributed(ck_cluster,tsg_galaxy_v3,session_record_http_domain_local,rand()); CREATE TABLE IF NOT EXISTS tsg_galaxy_v3.session_record_common_client_ip ON CLUSTER ck_query( @@ -4610,7 +4610,7 @@ CREATE TABLE IF NOT EXISTS tsg_galaxy_v3.session_record_common_client_ip ON CLUS common_client_port Int64, common_server_port Int64, common_app_label LowCardinality(String), - common_direction Int64 + common_direction Nullable(Int64) ) ENGINE =Distributed(ck_cluster,tsg_galaxy_v3,session_record_common_client_ip_local,rand()); CREATE TABLE IF NOT EXISTS tsg_galaxy_v3.session_record_common_server_ip ON CLUSTER ck_query( @@ -4628,7 +4628,7 @@ CREATE TABLE IF NOT EXISTS tsg_galaxy_v3.session_record_common_server_ip ON CLUS common_client_port Int64, common_server_port Int64, common_app_label LowCardinality(String), - common_direction Int64 + common_direction Nullable(Int64) ) ENGINE =Distributed(ck_cluster,tsg_galaxy_v3,session_record_common_server_ip_local,rand()); @@ -4647,7 +4647,7 @@ CREATE TABLE IF NOT EXISTS tsg_galaxy_v3.session_record_http_domain ON CLUSTER c common_client_port Int64, common_server_port Int64, common_app_label LowCardinality(String), - common_direction Int64 + common_direction Nullable(Int64) ) ENGINE =Distributed(ck_cluster,tsg_galaxy_v3,session_record_http_domain_local,rand()); @@ -4686,7 +4686,7 @@ common_recv_time Int64, common_entrance_id Int64, common_device_id String, common_egress_link_id Nullable(Int64), - common_ingress_link_id Nullable(Int64), +common_ingress_link_id Nullable(Int64), common_policy_id Int64, common_user_region String, ad_method String, @@ -4714,7 +4714,7 @@ common_recv_time Int64, common_entrance_id Int64, common_device_id String, common_egress_link_id Nullable(Int64), - common_ingress_link_id Nullable(Int64), +common_ingress_link_id Nullable(Int64), common_policy_id Int64, common_user_region String, ad_method String, @@ -4739,4 +4739,3 @@ ENGINE =Distributed(ck_cluster,tsg_galaxy_v3,active_defence_event_local,rand()); alter table tsg_galaxy_v3.session_record_local on cluster ck_cluster add INDEX IF NOT EXISTS client_index common_client_ip type bloom_filter(0.05) GRANULARITY 1; alter table tsg_galaxy_v3.transaction_record_local on cluster ck_cluster add INDEX IF NOT EXISTS client_index common_client_ip type bloom_filter(0.05) GRANULARITY 1; alter table tsg_galaxy_v3.interim_session_record_local on cluster ck_cluster add INDEX IF NOT EXISTS client_index common_client_ip type bloom_filter(0.05) GRANULARITY 1; -