Examples are shown below. Please tell, how to set clickhouse settings using datagrip? Note that you must specify the sampling key correctly. For example, to get an effectively stored table, you can create it in the following configuration: CREATE TABLE codec_example (timestamp DateTime CODEC(DoubleDelta), slow_values Float32 CODEC(Gorilla)) ENGINE = MergeTree() Hello. Collect a summary of column/expression values for every N granules. Suppose we have a table to record user downloads that looks like the following. The SAMPLE clause allows for approximated SELECT query processing. — uniformly distributed in the domain of its data type: In a SAMPLE k clause, the sample is taken from the k fraction of data. Data can be quickly written one by one in the form of data fragments. A common use case in time series applications is to get the measurement value at a given point of time. See documentation in source code, in MergeTreeSettings.h -->