Skip to content

Commit

Permalink
chore: add indices for attributes (#366)
Browse files Browse the repository at this point in the history
indices on `stringTagMap`, `numberTagMap` and `boolTagMap` do not exist
today
  • Loading branch information
ankitnayan committed Sep 8, 2024
1 parent 0c652bf commit 26dbc30
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ALTER TABLE signoz_traces.signoz_index_v2 ON CLUSTER {{.SIGNOZ_CLUSTER}}
DROP INDEX IF EXISTS idx_stringTagMapKeys,
DROP INDEX IF EXISTS idx_stringTagMapValues,

DROP INDEX IF EXISTS idx_numberTagMapKeys,
DROP INDEX IF EXISTS idx_numberTagMapValues,

DROP INDEX IF EXISTS idx_boolTagMapKeys;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ALTER TABLE signoz_traces.signoz_index_v2 ON CLUSTER {{.SIGNOZ_CLUSTER}}
ADD INDEX IF NOT EXISTS idx_stringTagMapKeys mapKeys(stringTagMap) TYPE tokenbf_v1(1024, 2, 0) GRANULARITY 1,
ADD INDEX IF NOT EXISTS idx_stringTagMapValues mapValues(stringTagMap) TYPE ngrambf_v1(4, 5000, 2, 0) GRANULARITY 1,

ADD INDEX IF NOT EXISTS idx_numberTagMapValues mapKeys(numberTagMap) TYPE tokenbf_v1(1024, 2, 0) GRANULARITY 1,
ADD INDEX IF NOT EXISTS idx_numberTagMapValues mapValues(numberTagMap) TYPE bloom_filter(0.01) GRANULARITY 1,

ADD INDEX IF NOT EXISTS idx_boolTagMapKeys mapKeys(boolTagMap) TYPE tokenbf_v1(1024, 2, 0) GRANULARITY 1;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ALTER TABLE signoz_traces.signoz_index_v2 ON CLUSTER {{.SIGNOZ_CLUSTER}}
DROP INDEX IF EXISTS idx_resourceTagMapKeys,
DROP INDEX IF EXISTS idx_resourceTagMapValues,

ADD INDEX IF NOT EXISTS idx_resourceTagsMapKeys mapKeys(resourceTagsMap) TYPE bloom_filter(0.01) GRANULARITY 64,
ADD INDEX IF NOT EXISTS idx_resourceTagsMapValues mapValues(resourceTagsMap) TYPE bloom_filter(0.01) GRANULARITY 64;


Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ALTER TABLE signoz_traces.signoz_index_v2 ON CLUSTER {{.SIGNOZ_CLUSTER}}
ADD INDEX IF NOT EXISTS idx_resourceTagMapKeys mapKeys(resourceTagsMap) TYPE tokenbf_v1(1024, 2, 0) GRANULARITY 1,
ADD INDEX IF NOT EXISTS idx_resourceTagMapValues mapValues(resourceTagsMap) TYPE ngrambf_v1(4, 5000, 2, 0) GRANULARITY 1;

0 comments on commit 26dbc30

Please sign in to comment.