@@ -43,14 +43,6 @@ CREATE TABLE ct_log_entries
4343 -- Other Key Parsed Certificate Fields
4444 serial_number String COMMENT ' Certificate serial number (hex string)' ,
4545 subject_alternative_names Array(String) COMMENT ' Array of Subject Alternative Names (DNS, IP, etc.)' ,
46- name_suffixes Array(String) MATERIALIZED arrayDistinct(
47- arrayFlatten(
48- arrayMap(x - > arrayMap(
49- i - > substring (x, i), arrayFilter(i - > i > 0 , arrayMap(pos - > position(x, ' .' , pos), range(1 , length(x) + 1 )))
50- ),
51- arrayConcat(subject_alternative_names, [subject_common_name])
52- ))
53- ) COMMENT ' All domain suffixes from subject_alternative_names and subject_common_name (e.g., .example.com, .com)' ,
5446 signature_algorithm LowCardinality(String) COMMENT ' Signature algorithm of the certificate' ,
5547 subject_public_key_algorithm LowCardinality(String) COMMENT ' Algorithm of the subject public key' ,
5648 subject_public_key_length UInt16 COMMENT ' Length of the subject public key (e.g., 2048, 256)' ,
@@ -93,8 +85,7 @@ CREATE TABLE ct_log_entries
9385 INDEX idx_sans subject_alternative_names TYPE bloom_filter GRANULARITY 4 , -- For has(subject_alternative_names, 'value')
9486 INDEX idx_serial serial_number TYPE bloom_filter GRANULARITY 1 ,
9587 INDEX idx_not_after not_after TYPE minmax,
96- INDEX idx_entry_timestamp entry_timestamp TYPE minmax,
97- INDEX idx_name_suffixes name_suffixes TYPE bloom_filter GRANULARITY 4 -- For has(name_suffixes, 'value')
88+ INDEX idx_entry_timestamp entry_timestamp TYPE minmax
9889)
9990ENGINE = ReplacingMergeTree()
10091PARTITION BY toYYYYMM(not_after) -- Partition by month of certificate expiry
0 commit comments