Skip to content

Commit

Permalink
add bloom_filter index in ClickHouse (#349)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenghaoz authored Dec 26, 2021
1 parent 55a0714 commit f824565
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion storage/data/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,9 @@ func (d *SQLDatabase) Init() error {
"item_id String," +
"time_stamp Datetime," +
"comment String," +
"version DateTime" +
"version DateTime," +
"INDEX user_index user_id TYPE bloom_filter(0.01) GRANULARITY 1," +
"INDEX item_index item_id TYPE bloom_filter(0.01) GRANULARITY 1" +
") ENGINE = ReplacingMergeTree(version) ORDER BY (feedback_type, user_id, item_id)"); err != nil {
return errors.Trace(err)
}
Expand Down

0 comments on commit f824565

Please sign in to comment.