id stringlengths 36 36 | document stringlengths 3 3k | metadata stringlengths 23 69 | embeddings listlengths 384 384 |
|---|---|---|---|
0cfee71c-914e-4d99-bff1-d3b105021b26 | description: 'The engine allows to import and export data to SQLite and supports queries
to SQLite tables directly from ClickHouse.'
sidebar_label: 'SQLite'
sidebar_position: 185
slug: /engines/table-engines/integrations/sqlite
title: 'SQLite table engine'
doc_type: 'reference'
import CloudNotSupportedBadge from ... | {"source_file": "sqlite.md"} | [
-0.021504055708646774,
-0.06914684921503067,
-0.049359280616045,
0.06589653342962265,
0.0030910130590200424,
-0.0006787538877688348,
0.0652373656630516,
0.012992089614272118,
-0.10843457281589508,
0.025094307959079742,
0.016777245327830315,
-0.04054002836346626,
0.077693872153759,
-0.11722... |
3aa551cc-8ecd-4f10-abfd-75b669f86bff | description: 'This engine provides integration with the Amazon S3 ecosystem and allows
streaming imports. Similar to the Kafka and RabbitMQ engines, but provides S3-specific
features.'
sidebar_label: 'S3Queue'
sidebar_position: 181
slug: /engines/table-engines/integrations/s3queue
title: 'S3Queue table engine'
doc_... | {"source_file": "s3queue.md"} | [
-0.0647626593708992,
-0.06535153836011887,
-0.1438402682542801,
-0.005026510916650295,
0.03606662526726723,
0.05763305351138115,
0.001641182810999453,
-0.04637071117758751,
0.028710801154375076,
0.00011805837857536972,
-0.004590210039168596,
-0.03814777731895447,
0.04688384011387825,
-0.11... |
c6da609b-4fdb-4cb5-9732-a56af5b7d4eb | Settings {#settings}
To get a list of settings, configured for the table, use
system.s3_queue_settings
table. Available from
24.10
.
Mode {#mode}
Possible values:
unordered β With unordered mode, the set of all already processed files is tracked with persistent nodes in ZooKeeper.
ordered β With ordered ... | {"source_file": "s3queue.md"} | [
-0.03640495985746384,
-0.01474732905626297,
-0.06831547617912292,
0.02169528789818287,
0.016957037150859833,
-0.026255793869495392,
0.020888429135084152,
-0.016732024028897285,
-0.005434567108750343,
0.07444333285093307,
0.010719073005020618,
0.02541220374405384,
0.021676180884242058,
-0.0... |
76d1bc32-22b6-4e75-8089-6a84d2ffb02b | Possible values:
Positive integer.
Default value:
10000
.
s3queue_polling_backoff_ms
{#polling_backoff_ms}
Determines the additional wait time added to the previous polling interval when no new files are found. The next poll occurs after the sum of the previous interval and this backoff value, or the maxi... | {"source_file": "s3queue.md"} | [
-0.0344192273914814,
-0.00923642423003912,
-0.03732464089989662,
0.024212148040533066,
0.08762483298778534,
-0.010617339052259922,
-0.00941411592066288,
-0.026574861258268356,
0.0134138697758317,
0.07020572572946548,
-0.011302643455564976,
0.03579762578010559,
0.019650425761938095,
-0.0237... |
abd53124-cf06-4202-8154-cebccef5ae95 | Default value:
3600
(1 hour).
S3-related settings {#s3-settings}
Engine supports all s3 related settings. For more information about S3 settings see
here
.
S3 role-based access {#s3-role-based-access}
The s3Queue table engine supports role-based access.
Refer to the documentation
here
for steps to config... | {"source_file": "s3queue.md"} | [
-0.011091593652963638,
0.009104701690375805,
-0.09878760576248169,
0.009035538882017136,
-0.010798158124089241,
0.000001564923650221317,
0.02706380933523178,
-0.015997184440493584,
0.009013943374156952,
0.04353807121515274,
-0.048054177314043045,
-0.060295093804597855,
0.06785530596971512,
... |
30cb7d06-95a7-4f10-a489-df00f663affc | When the
MATERIALIZED VIEW
joins the engine, it starts collecting data in the background.
Example:
```sql
CREATE TABLE s3queue_engine_table (name String, value UInt32)
ENGINE=S3Queue('https://clickhouse-public-datasets.s3.amazonaws.com/my-test-bucket-768/*', 'CSV', 'gzip')
SETTINGS
mode = 'unord... | {"source_file": "s3queue.md"} | [
-0.001963173970580101,
-0.004216316621750593,
-0.13314373791217804,
0.01842648535966873,
0.00029134558280929923,
-0.025435835123062134,
-0.036073457449674606,
-0.0015300950035452843,
0.049902718514204025,
0.04963621124625206,
0.01885521039366722,
-0.03899578005075455,
0.040151841938495636,
... |
12200850-071e-4f92-ad3d-d5460d4ba8ed | system.s3queue
. This table is not persistent and shows in-memory state of
S3Queue
: which files are currently being processed, which files are processed or failed.
sql
ββstatementβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ... | {"source_file": "s3queue.md"} | [
-0.012538651935756207,
-0.06656055152416229,
-0.17724764347076416,
0.02067599445581436,
0.05343388020992279,
-0.053660281002521515,
0.08404847234487534,
0.02030664123594761,
0.03953664377331734,
0.07338303327560425,
0.00447538448497653,
0.007806263864040375,
0.07118147611618042,
-0.0396567... |
0cdc0a96-82b1-46a5-bc3d-f6cb5074d89c | The table has the following structure:
```sql
SHOW CREATE TABLE system.s3queue_log
Query id: 0ad619c3-0f2a-4ee4-8b40-c73d86e04314
ββstatementβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ... | {"source_file": "s3queue.md"} | [
0.056875236332416534,
-0.0522296316921711,
-0.07458774000406265,
-0.018800269812345505,
0.004429057706147432,
-0.03451450541615486,
0.015478807501494884,
0.0517779104411602,
0.004615903832018375,
0.03619205206632614,
0.04272833466529846,
-0.05887195095419884,
0.04390609264373779,
-0.098454... |
e00c292d-ce4f-47a2-b127-f942177d8994 | description: 'This engine provides an integration with the Azure Blob Storage ecosystem,
allowing streaming data import.'
sidebar_label: 'AzureQueue'
sidebar_position: 181
slug: /engines/table-engines/integrations/azure-queue
title: 'AzureQueue table engine'
doc_type: 'reference'
AzureQueue table engine
This en... | {"source_file": "azure-queue.md"} | [
-0.005620880983769894,
-0.04055175930261612,
-0.12461699545383453,
0.04792756959795952,
-0.08114388585090637,
0.02583911456167698,
0.0793556347489357,
-0.023136908188462257,
-0.042929183691740036,
0.09906850755214691,
0.028205377981066704,
-0.05078817903995514,
0.13543164730072021,
-0.0245... |
5c385597-d1bd-4179-a9e4-9f3ca0eb679a | Enable logging for the table via the table setting
enable_logging_to_queue_log=1
.
Introspection capabilities are the same as the
S3Queue table engine
with several distinct differences:
Use the
system.azure_queue
for the in-memory state of the queue for server versions >= 25.1. For older versions use the
sy... | {"source_file": "azure-queue.md"} | [
0.036954112350940704,
-0.0782916247844696,
-0.11521261930465698,
0.07083135843276978,
0.0001187500893138349,
-0.061593104153871536,
0.08877497166395187,
-0.09480472654104233,
0.08388996869325638,
0.13989397883415222,
0.009013615548610687,
-0.018392981961369514,
0.08127555251121521,
-0.0214... |
c19c9f76-24f8-461d-95aa-49d06d82dfb9 | description: 'A table engine storing time series, i.e. a set of values associated
with timestamps and tags (or labels).'
sidebar_label: 'TimeSeries'
sidebar_position: 60
slug: /engines/table-engines/special/time_series
title: 'TimeSeries table engine'
doc_type: 'reference'
import ExperimentalBadge from '@theme/ba... | {"source_file": "time-series.md"} | [
-0.03243141621351242,
0.029479295015335083,
-0.06021224707365036,
0.03513089567422867,
-0.02900911122560501,
-0.006223399192094803,
0.04306876286864281,
0.017696402966976166,
-0.005061548203229904,
-0.018200896680355072,
0.0004408766108099371,
-0.08307220786809921,
0.03568360209465027,
-0.... |
fc3d9ad5-4e20-475a-9e69-9668339f1209 | Tags table {#tags-table}
The
tags
table contains identifiers calculated for each combination of a metric name and tags.
The
tags
table must have columns:
| Name | Mandatory? | Default type | Possible types | Description |
|---|---|---|---|---|
|
id
| [x] |
UUID
| any (must match the type of
id
in the
d... | {"source_file": "time-series.md"} | [
0.040150124579668045,
0.02197371982038021,
-0.09167636185884476,
-0.02260150946676731,
0.0007299063727259636,
-0.04025573283433914,
0.052773941308259964,
0.039860233664512634,
-0.040000662207603455,
-0.01366262324154377,
0.044411659240722656,
-0.12783338129520416,
0.044431716203689575,
-0.... |
dd18bac9-dde0-43aa-9d06-6323360fba01 | Creation {#creation}
There are multiple ways to create a table with the
TimeSeries
table engine.
The simplest statement
sql
CREATE TABLE my_table ENGINE=TimeSeries
will actually create the following table (you can see that by executing
SHOW CREATE TABLE my_table
):
sql
CREATE TABLE my_table
(
`id` UUID D... | {"source_file": "time-series.md"} | [
-0.03493044897913933,
-0.03469092771410942,
-0.0265052393078804,
-0.009305793792009354,
-0.09200950711965561,
-0.08023791760206223,
-0.033490125089883804,
0.07802624255418777,
-0.012988024391233921,
0.006756300572305918,
0.02456987462937832,
-0.06103869900107384,
0.0032526368740946054,
-0.... |
216350f9-bda6-44c8-a90f-1e066e4c1c71 | sql
CREATE TABLE my_table
(
timestamp DateTime64(6)
) ENGINE=TimeSeries
will make the inner
data
table store timestamp in microseconds instead of milliseconds:
sql
CREATE TABLE default.`.inner_id.data.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`
(
`id` UUID,
`timestamp` DateTime64(6),
`value` Float64
)
E... | {"source_file": "time-series.md"} | [
0.005708985961973667,
0.005552639253437519,
-0.05562007799744606,
-0.0250598955899477,
-0.03826321288943291,
-0.04941481351852417,
0.018026836216449738,
0.06879284977912903,
0.03131631016731262,
0.025044038891792297,
0.042118873447179794,
-0.05685636028647423,
-0.006892666686326265,
-0.045... |
055b651a-7549-4472-808b-86e87362e157 | External target tables {#external-target-tables}
It's possible to make a
TimeSeries
table use a manually created table:
``sql
CREATE TABLE data_for_my_table
(
id
UUID,
timestamp
DateTime64(3),
value` Float64
)
ENGINE = MergeTree
ORDER BY (id, timestamp);
CREATE TABLE tags_for_my_table ...
CREATE TABLE metrics... | {"source_file": "time-series.md"} | [
-0.014798304997384548,
-0.025615768507122993,
-0.06647622585296631,
0.05344739556312561,
-0.017742440104484558,
-0.06224508211016655,
-0.024615557864308357,
0.08641396462917328,
-0.059792935848236084,
0.007438609842211008,
-0.009092633612453938,
-0.10000688582658768,
0.015855079516768456,
... |
98719551-37d8-4d70-b956-ac17bb8db11f | description: 'MongoDB engine is read-only table engine which allows to read data from
a remote collection.'
sidebar_label: 'MongoDB'
sidebar_position: 135
slug: /engines/table-engines/integrations/mongodb
title: 'MongoDB table engine'
doc_type: 'reference'
MongoDB table engine
MongoDB engine is read-only table ... | {"source_file": "mongodb.md"} | [
0.009928509593009949,
-0.014641467481851578,
-0.1015317440032959,
0.07639823853969574,
-0.03448047861456871,
-0.049272578209638596,
-0.052880290895700455,
0.03720826283097267,
-0.033392228186130524,
0.01422155648469925,
-0.010694818571209908,
-0.03770051524043083,
0.022532997652888298,
-0.... |
687d30a1-93f3-47d4-ba2d-15383da28020 | Alternatively, you can pass a URI:
sql
ENGINE = MongoDB(uri, collection[, oid_columns]);
Engine Parameters
| Parameter | Description |
|---------------|-------------------------------------------------------------------... | {"source_file": "mongodb.md"} | [
0.007073717657476664,
0.06574223190546036,
-0.07732018828392029,
0.08542202413082123,
-0.04679049924015999,
-0.053224917501211166,
-0.01981372758746147,
0.00012501233140937984,
-0.00047052904847078025,
-0.05045497417449951,
-0.05206320434808731,
-0.08065051585435867,
-0.01836632564663887,
... |
56c95f69-6131-40b3-a3a7-2efd4f2eb3fc | By default, only
_id
is treated as
oid
column.
```sql
CREATE TABLE sample_oid
(
_id String,
another_oid_column String
) ENGINE = MongoDB('mongodb://user:pass@host/db', 'sample_oid');
SELECT count() FROM sample_oid WHERE _id = '67bf6cc44ebc466d33d42fb2'; --will output 1.
SELECT count() FROM sample_oid WH... | {"source_file": "mongodb.md"} | [
0.02078390121459961,
0.040494851768016815,
-0.11819636821746826,
0.07599037140607834,
-0.03009900450706482,
-0.06147390604019165,
0.06533126533031464,
0.035946544259786606,
0.03859393671154976,
-0.0625268816947937,
0.03759586438536644,
-0.09365787357091904,
0.02923743985593319,
-0.10615889... |
ff8a6f8f-4ea8-4801-9303-dcc971a9add3 | text
ββcount()ββ
1. β 21349 β
βββββββββββ
```sql
-- JSONExtractString cannot be pushed down to MongoDB
SET mongodb_throw_on_unsupported_query = 0;
-- Find all 'Back to the Future' sequels with rating > 7.5
SELECT title, plot, genres, directors, released FROM sample_mflix_table
WHERE title IN ('Back to the F... | {"source_file": "mongodb.md"} | [
-0.061664823442697525,
0.01586325094103813,
-0.018918069079518318,
0.0019043191568925977,
-0.013559338636696339,
-0.0035318892914801836,
0.01272444985806942,
0.009684084914624691,
0.044672124087810516,
-0.014943624846637249,
0.04039618745446205,
-0.03304130956530571,
0.016063673421740532,
... |
efe78b54-a733-4857-b2b8-65657880f250 | description: 'Allows for quick writing of object states that are continually changing,
and deleting old object states in the background.'
sidebar_label: 'VersionedCollapsingMergeTree'
sidebar_position: 80
slug: /engines/table-engines/mergetree-family/versionedcollapsingmergetree
title: 'VersionedCollapsingMergeTree t... | {"source_file": "versionedcollapsingmergetree.md"} | [
-0.04353385791182518,
0.007301445584744215,
0.0022733225487172604,
0.06383322179317474,
0.038975026458501816,
-0.051921360194683075,
-0.055055394768714905,
-0.010786861181259155,
0.01994936354458332,
0.03730837255716324,
0.023038841784000397,
0.09287835657596588,
0.010935496538877487,
-0.1... |
0618be8b-4757-4e40-a7e3-9c14d8546b3c | Query clauses {#query-clauses}
When creating a
VersionedCollapsingMergeTree
table, the same
clauses
are required as when creating a
MergeTree
table.
Deprecated Method for Creating a Table
:::note
Do not use this method in new projects. If possible, switch old projects to the method described above.
:::
`... | {"source_file": "versionedcollapsingmergetree.md"} | [
0.011905944906175137,
0.004013546276837587,
0.014877794310450554,
0.032242219895124435,
-0.008909656666219234,
-0.023605838418006897,
-0.013762752525508404,
0.0031778584234416485,
-0.045673809945583344,
0.06477319449186325,
0.037566885352134705,
-0.05627751722931862,
0.03869152441620827,
-... |
07b05391-97fb-4396-9789-3ba927f1f955 | The second row contains the current state.
Because we need only the last state of user activity, the rows
text
βββββββββββββββUserIDββ¬βPageViewsββ¬βDurationββ¬βSignββ¬βVersionββ
β 4324182021466249494 β 5 β 146 β 1 β 1 |
β 4324182021466249494 β 5 β 146 β -1 β 1 |
βββββββββββββ... | {"source_file": "versionedcollapsingmergetree.md"} | [
-0.02505054697394371,
0.05224308371543884,
0.009970046579837799,
0.02832869067788124,
-0.02752450481057167,
-0.07887892425060272,
-0.015430120751261711,
-0.059298641979694366,
0.05591532215476036,
0.071363165974617,
-0.050044964998960495,
0.05723848566412926,
-0.044921375811100006,
-0.1387... |
325055d1-38a9-444d-afc3-f473198a321f | If you need to extract the data with "collapsing" but without aggregation (for example, to check whether rows are present whose newest values match certain conditions), you can use the
FINAL
modifier for the
FROM
clause. This approach is inefficient and should not be used with large tables.
Example of use {#examp... | {"source_file": "versionedcollapsingmergetree.md"} | [
-0.027427267283201218,
0.010719673708081245,
0.07355505973100662,
0.02316698059439659,
-0.016281938180327415,
0.01723944954574108,
0.06161835417151451,
-0.02324937842786312,
-0.059101782739162445,
0.036087244749069214,
0.05216028541326523,
0.014091040939092636,
0.033297568559646606,
-0.090... |
defbc269-234a-4865-9ef2-b430be869b5c | description: 'Overview of data replication with the Replicated
family of table engines in ClickHouse'
sidebar_label: 'Replicated
'
sidebar_position: 20
slug: /engines/table-engines/mergetree-family/replication
title: 'Replicated* table engines'
doc_type: 'reference'
Replicated* table engines
:::note
In ClickHous... | {"source_file": "replication.md"} | [
-0.03645034506917,
-0.12061243504285812,
-0.014979583211243153,
0.0010765180923044682,
-0.07378531247377396,
-0.055093783885240555,
-0.03983760625123978,
-0.09236371517181396,
-0.023719370365142822,
0.050674062222242355,
0.044504571706056595,
-0.015182523056864738,
0.1271667629480362,
-0.0... |
dde88c52-af41-48bf-b752-c5a526ecad4a | Example of setting the addresses of the auxiliary ZooKeeper cluster:
xml
<auxiliary_zookeepers>
<zookeeper2>
<node>
<host>example_2_1</host>
<port>2181</port>
</node>
<node>
<host>example_2_2</host>
<port>2181</port>
</node>
<... | {"source_file": "replication.md"} | [
0.03892076760530472,
-0.04405733942985535,
-0.07859887927770615,
-0.01340124849230051,
-0.04451170563697815,
-0.060731202363967896,
-0.023574644699692726,
0.01108975987881422,
-0.052341919392347336,
0.031019441783428192,
-0.004967271350324154,
-0.09058944135904312,
0.11878760904073715,
-0.... |
4b3c64a8-a68a-4a4d-a8ae-e531aac108ca | Replication is asynchronous and multi-master.
INSERT
queries (as well as
ALTER
) can be sent to any available server. Data is inserted on the server where the query is run, and then it is copied to the other servers. Because it is asynchronous, recently inserted data appears on the other replicas with some latency. ... | {"source_file": "replication.md"} | [
-0.012861249037086964,
-0.05270733684301376,
-0.03351663425564766,
0.0457254983484745,
-0.030343038961291313,
-0.10000120848417282,
-0.06601715832948685,
-0.04854917526245117,
0.05570199713110924,
0.06511498987674713,
-0.01773208938539028,
0.0163877010345459,
0.09380123764276505,
-0.078338... |
1853c259-4223-4aed-ac81-77b0f920121e | Creating replicated tables {#creating-replicated-tables}
:::note
In ClickHouse Cloud, replication is handled automatically.
Create tables using
MergeTree
without replication arguments. The system internally rewrites
MergeTree
to
SharedMergeTree
for replication and data distribution.
Avoid using
ReplicatedM... | {"source_file": "replication.md"} | [
-0.014657002873718739,
-0.04915512353181839,
-0.03217502310872078,
0.008293312042951584,
-0.0578170120716095,
-0.04502703994512558,
-0.02900751866400242,
-0.057438116520643234,
-0.03199674189090729,
0.10544496774673462,
0.058770254254341125,
-0.075138621032238,
0.09139709919691086,
-0.0512... |
eea7f39a-0c5d-4e70-9d19-2e4c9faa1358 | HINT
: you could add a database name in front of
table_name
as well. E.g.
db_name.table_name
The two built-in substitutions
{database}
and
{table}
can be used, they expand into the table name and the database name respectively (unless these macros are defined in the
macros
section). So the zookeeper path can... | {"source_file": "replication.md"} | [
0.0022284123115241528,
-0.05659450218081474,
-0.06338022649288177,
0.016893437132239342,
-0.0439862459897995,
-0.06083904579281807,
0.04960595816373825,
-0.03924034163355827,
-0.020387716591358185,
0.033270418643951416,
0.01963438093662262,
-0.0907355472445488,
0.10093265771865845,
0.00123... |
866e47e7-f833-4424-b334-3a19781f8d61 | If the system detects broken data parts (with the wrong size of files) or unrecognized parts (parts written to the file system but not recorded in ClickHouse Keeper), it moves them to the
detached
subdirectory (they are not deleted). Any missing parts are copied from the replicas.
Note that ClickHouse does not perf... | {"source_file": "replication.md"} | [
-0.04186347499489784,
-0.02409905195236206,
0.012898129411041737,
0.024047035723924637,
0.08694982528686523,
-0.14338423311710358,
0.025530168786644936,
-0.08439880609512329,
0.09050920605659485,
0.062402501702308655,
0.06164092198014259,
0.029784206300973892,
0.03773952275514603,
-0.03164... |
5aa7a9bb-6f44-43e8-9a1f-545944df8d7a | Then start the server (restart, if it is already running). Data will be downloaded from replicas.
An alternative recovery option is to delete information about the lost replica from ClickHouse Keeper (
/path_to_table/replica_name
), then create the replica again as described in "
Creating replicated tables
".
There... | {"source_file": "replication.md"} | [
0.013946380466222763,
-0.08966471254825592,
-0.037359077483415604,
0.020392877981066704,
-0.016345510259270668,
-0.058752063661813736,
-0.03852532058954239,
-0.005452799145132303,
-0.04935730993747711,
0.09256686270236969,
0.02317613922059536,
0.008284845389425755,
0.03807410970330238,
-0.... |
feaf8ba7-4b92-4c8b-8407-cbd6db89aeae | Use
ATTACH TABLE ... AS NOT REPLICATED
statement to attach detached
ReplicatedMergeTree
table as
MergeTree
on a single server.
Another way to do this involves server restart. Create a MergeTree table with a different name. Move all the data from the directory with the
ReplicatedMergeTree
table data to the new... | {"source_file": "replication.md"} | [
0.0031367531046271324,
-0.07768335938453674,
-0.009752768091857433,
0.016949458047747612,
-0.010152410715818405,
-0.0757000669836998,
-0.006158181931823492,
-0.0626528412103653,
-0.008214667439460754,
0.08481337130069733,
0.05878812447190285,
-0.006174973212182522,
0.07975783944129944,
-0.... |
a888887e-f4d3-4717-adec-8b795424d4b9 | description: '
MergeTree
-family table engines are designed for high data ingest rates
and huge data volumes.'
sidebar_label: 'MergeTree'
sidebar_position: 11
slug: /engines/table-engines/mergetree-family/mergetree
title: 'MergeTree table engine'
doc_type: 'reference'
import ExperimentalBadge from '@theme/badges/... | {"source_file": "mergetree.md"} | [
-0.036942463368177414,
-0.02530006505548954,
-0.009459229186177254,
-0.014694686979055405,
-0.01674514263868332,
-0.08615246415138245,
-0.03763648867607117,
0.028641052544116974,
-0.03486092761158943,
0.030363138765096664,
-0.011124612763524055,
0.0226894523948431,
0.026262231171131134,
-0... |
405f778d-1280-4055-a730-fea6b4c1c382 | For a detailed description of the parameters, see the
CREATE TABLE
statement
Query clauses {#mergetree-query-clauses}
ENGINE {#engine}
ENGINE
β Name and parameters of the engine.
ENGINE = MergeTree()
. The
MergeTree
engine has no parameters.
ORDER BY {#order_by}
ORDER BY
β The sorting key.
A tuple of... | {"source_file": "mergetree.md"} | [
0.00009360658441437408,
-0.037167347967624664,
0.03197856992483139,
0.03157760947942734,
-0.07579676806926727,
-0.04097113013267517,
0.008709317073225975,
0.04888933524489403,
-0.011436102911829948,
0.015432021580636501,
0.03330934792757034,
-0.002939137862995267,
0.005163250025361776,
-0.... |
0768240e-34b6-414c-b0a6-38690d1a80c6 | For more details, see
TTL for columns and tables
SETTINGS {#settings}
See
MergeTree Settings
.
Example of Sections Setting
sql
ENGINE MergeTree() PARTITION BY toYYYYMM(EventDate) ORDER BY (CounterID, EventDate, intHash32(UserID)) SAMPLE BY intHash32(UserID) SETTINGS index_granularity=8192
In the example, we... | {"source_file": "mergetree.md"} | [
0.05806613340973854,
-0.05177025496959686,
-0.03213462233543396,
0.0208504106849432,
-0.056623123586177826,
-0.03969084843993187,
0.06339149922132492,
0.03032398782670498,
-0.05696567893028259,
0.03461691737174988,
0.028982864692807198,
-0.0448443703353405,
0.031986843794584274,
-0.0941829... |
6f5420c9-5153-4418-bd0f-09a2e0ef1f78 | Data storing format is controlled by the
min_bytes_for_wide_part
and
min_rows_for_wide_part
settings of the table engine. If the number of bytes or rows in a data part is less then the corresponding setting's value, the part is stored in
Compact
format. Otherwise it is stored in
Wide
format. If none of these se... | {"source_file": "mergetree.md"} | [
0.04583568871021271,
0.007527479901909828,
-0.08800362795591354,
0.0039036304224282503,
-0.017583230510354042,
-0.047930583357810974,
0.018511831760406494,
0.016633275896310806,
0.004294017795473337,
-0.0013420601608231664,
-0.031883396208286285,
0.04397101700305939,
0.03141967952251434,
-... |
28391df6-5d4c-4e49-b6e9-b86e3f9a5f51 | ClickHouse does not require a unique primary key. You can insert multiple rows with the same primary key.
You can use
Nullable
-typed expressions in the
PRIMARY KEY
and
ORDER BY
clauses but it is strongly discouraged. To allow this feature, turn on the
allow_nullable_key
setting. The
NULLS_LAST
principle app... | {"source_file": "mergetree.md"} | [
-0.02648286148905754,
-0.026870811358094215,
-0.06704125553369522,
-0.02501845359802246,
-0.06999906897544861,
-0.027209561318159103,
-0.028473973274230957,
-0.05815825238823891,
0.003814299590885639,
0.01295389886945486,
0.004125265870243311,
0.004553027916699648,
0.01800423301756382,
-0.... |
24a31986-8f6f-4fca-b873-0ae7a7150684 | In this case it makes sense to leave only a few columns in the primary key that will provide efficient range scans and add the remaining dimension columns to the sorting key tuple.
ALTER
of the sorting key is a lightweight operation because when a new column is simultaneously added to the table and to the sorting ke... | {"source_file": "mergetree.md"} | [
0.017665941268205643,
-0.0031045570503920317,
0.013780062086880207,
0.05028422176837921,
0.018709739670157433,
-0.01583728939294815,
-0.01172794122248888,
-0.0388447642326355,
-0.0017959806136786938,
0.034242138266563416,
0.013504095375537872,
0.08061748743057251,
-0.01854775846004486,
-0.... |
158cd40d-3abf-45d1-bdb4-07f75965a324 | To check whether ClickHouse can use the index when running a query, use the settings
force_index_by_date
and
force_primary_key
.
The key for partitioning by month allows reading only those data blocks which contain dates from the proper range. In this case, the data block may contain data for many dates (up to an ... | {"source_file": "mergetree.md"} | [
-0.01451475266367197,
-0.023501550778746605,
0.03291986510157585,
0.04228004068136215,
-0.007719514891505241,
-0.04205084219574928,
-0.015893103554844856,
-0.03995063900947571,
0.001558350631967187,
-0.01250361930578947,
-0.0020388567354530096,
0.008559719659388065,
-0.014947404153645039,
... |
99bf53ba-da6e-417c-b579-6d1ee6a422d8 | Indices from the example can be used by ClickHouse to reduce the amount of data to read from disk in the following queries:
sql
SELECT count() FROM table WHERE u64 == 10;
SELECT count() FROM table WHERE u64 * i32 >= 1234
SELECT count() FROM table WHERE u64 * length(s) == 1234
Data skipping indexes can also be creat... | {"source_file": "mergetree.md"} | [
0.07373565435409546,
0.01557394303381443,
0.020655451342463493,
0.06246478483080864,
-0.04954047128558159,
-0.05750156193971634,
0.009771340526640415,
-0.023047475144267082,
-0.024915914982557297,
0.03272402659058571,
0.019442129880189896,
0.00546051561832428,
0.020393598824739456,
-0.0914... |
019622c0-f58f-4793-9564-d014d37ce1cf | For each index granule stores a
bloom filter
for the
n-grams
of the specified columns.
text title="Syntax"
ngrambf_v1(n, size_of_bloom_filter_in_bytes, number_of_hash_functions, random_seed)
| Parameter | Description |
|---------------------------------|-------------|
|
n
... | {"source_file": "mergetree.md"} | [
-0.017303509637713432,
-0.004103919956833124,
-0.050503604114055634,
0.0071370555087924,
0.014430089853703976,
-0.026279117912054062,
0.04157638177275658,
0.0225970596075058,
-0.024686254560947418,
-0.015155008062720299,
-0.06337150186300278,
0.015106926672160625,
0.01844044029712677,
-0.0... |
965ea98c-d09a-4e3e-88b2-1c6d753a8745 | Of course, you can also use those functions to estimate parameters for other conditions.
The functions above refer to the bloom filter calculator
here
.
Token bloom filter {#token-bloom-filter}
The token bloom filter is the same as
ngrambf_v1
, but stores tokens (sequences separated by non-alphanumeric characters... | {"source_file": "mergetree.md"} | [
-0.08526474237442017,
0.020204154774546623,
-0.010762392543256283,
0.031179921701550484,
0.02745972014963627,
0.026053693145513535,
0.0423249825835228,
0.009401951916515827,
-0.010025078430771828,
-0.016589656472206116,
-0.04578099027276039,
0.04572552442550659,
0.011558874510228634,
-0.02... |
c9c18d43-19fb-434c-bf0a-64335a242dad | | Function (operator) / Index | primary key | minmax | ngrambf_v1 | tokenbf_v1 | bloom_filter | text |
|---------------------------------------------------------------------------------------------------------------------... | {"source_file": "mergetree.md"} | [
-0.04140439257025719,
0.06372229754924774,
-0.010378805920481682,
-0.03691123053431511,
-0.07436931133270264,
-0.028740262612700462,
0.06562942266464233,
-0.008633493445813656,
0.034865375608205795,
-0.02261338196694851,
0.019584951922297478,
-0.06017746776342392,
0.04913502559065819,
-0.0... |
b7db3b10-b605-438e-a33f-c8317071909d | |
has
| β | β | β | β | β | β |
|
hasAny
| β | β | β | β | β | β |
|
hasAll
... | {"source_file": "mergetree.md"} | [
0.028054706752300262,
-0.012439119629561901,
0.0012887069024145603,
-0.015603968873620033,
-0.06118441000580788,
0.05905208736658096,
0.023452166467905045,
0.008253779262304306,
-0.09568458795547485,
0.0385696217417717,
0.06600939482450485,
-0.10364600270986557,
0.10337110608816147,
-0.030... |
fa7c0cab-ea5c-46d5-b5e4-7091093a1527 | Functions with a constant argument that is less than ngram size can't be used by
ngrambf_v1
for query optimization.
(*) For
hasTokenCaseInsensitive
and
hasTokenCaseInsensitiveOrNull
to be effective, the
tokenbf_v1
index must be created on lowercased data, for example
INDEX idx (lower(str_col)) TYPE tokenbf_v... | {"source_file": "mergetree.md"} | [
-0.029706913977861404,
0.03382127732038498,
0.013927011750638485,
0.02005668543279171,
0.03099878877401352,
0.0083469795063138,
0.023014893755316734,
0.02804156206548214,
-0.030694834887981415,
-0.002054936019703746,
-0.061932653188705444,
-0.007996097207069397,
-0.004976326134055853,
-0.0... |
58b3a747-f9d7-4a7f-a64d-82452f34755d | Reading from a table is automatically parallelized.
TTL for columns and tables {#table_engine-mergetree-ttl}
Determines the lifetime of values.
The
TTL
clause can be set for the whole table and for each individual column. Table-level
TTL
can also specify the logic of automatic moving data between disks and vo... | {"source_file": "mergetree.md"} | [
-0.014363749884068966,
-0.05317043140530586,
-0.06976903229951859,
0.03633113577961922,
-0.06572148203849792,
-0.0937008187174797,
-0.03664310276508331,
0.041959766298532486,
0.047325439751148224,
0.05040585622191429,
0.09274432808160782,
0.01914888806641102,
0.004991822876036167,
-0.04279... |
3de36255-ec93-4f72-b05e-43e7c25572da | sql
TTL time_column + INTERVAL 1 MONTH DELETE WHERE column = 'value'
GROUP BY
expression must be a prefix of the table primary key.
If a column is not part of the
GROUP BY
expression and is not set explicitly in the
SET
clause, in result row it contains an occasional value from the grouped rows (as if aggregat... | {"source_file": "mergetree.md"} | [
-0.027693945914506912,
-0.010557246394455433,
0.0598614439368248,
0.037859007716178894,
-0.0836087167263031,
-0.007377047091722488,
0.010963309556245804,
-0.004454403184354305,
0.009163887239992619,
-0.0030956040136516094,
0.06821086257696152,
0.000994913512840867,
0.013865333050489426,
-0... |
2ee89f5e-7b1d-459b-b059-01f83dabbc40 | -
s3_plain_rewritable
for immutable, non-replicated tables in S3
Using multiple block devices for data storage {#table_engine-mergetree-multiple-volumes}
Introduction {#introduction}
MergeTree
family table engines can store data on multiple block devices. For example, it can be useful when the data of a certai... | {"source_file": "mergetree.md"} | [
-0.03544727340340614,
-0.052834782749414444,
-0.04453957453370094,
0.018450528383255005,
0.04585369676351547,
-0.09101298451423645,
-0.05944763869047165,
0.00999538879841566,
0.019621793180704117,
0.007549065165221691,
0.042787689715623856,
0.047355107963085175,
0.07605554908514023,
-0.057... |
39221226-d711-4cc7-98a8-906ebf2ea49f | ```
Tags:
policy_name_N
β Policy name. Policy names must be unique.
volume_name_N
β Volume name. Volume names must be unique.
disk
β a disk within a volume.
max_data_part_size_bytes
β the maximum size of a part that can be stored on any of the volume's disks. If the a size of a merged part estimated to ... | {"source_file": "mergetree.md"} | [
-0.04889337345957756,
-0.050913479179143906,
0.006313883699476719,
-0.008596898056566715,
-0.008617635816335678,
-0.04929202422499657,
-0.012710314244031906,
-0.013674262911081314,
-0.022344468161463737,
0.03014645166695118,
0.023603560402989388,
0.0723167434334755,
0.06857980042695999,
-0... |
ea9a559a-120a-4996-8d55-7eb96ed187a9 | If only
some
volumes are tagged, those without the tag have the lowest priority, and they are prioritized in the order they are defined in config.
If
no
volumes are tagged, their priority is set correspondingly to their order they are declared in configuration.
Two volumes cannot have the same priority value.
... | {"source_file": "mergetree.md"} | [
0.009223263710737228,
-0.04785004258155823,
-0.031239960342645645,
-0.014888826757669449,
0.03000751882791519,
-0.03963667154312134,
-0.01101431343704462,
0.05114562436938286,
0.0304265059530735,
-0.0187012180685997,
0.06762264668941498,
0.035977553576231,
0.09824001789093018,
-0.020451605... |
79569b53-e424-4cdb-9778-d787e5494dd6 | The number of threads performing background moves of data parts can be changed by
background_move_pool_size
setting.
Details {#details}
In the case of
MergeTree
tables, data is getting to disk in different ways:
As a result of an insert (
INSERT
query).
During background merges and
mutations
.
When do... | {"source_file": "mergetree.md"} | [
-0.01595020480453968,
-0.05156936123967171,
0.04965697601437569,
-0.016173986718058586,
0.06542381644248962,
-0.0790569931268692,
-0.01859007589519024,
0.03710862994194031,
0.10774119198322296,
0.03905554860830307,
-0.0014017827343195677,
0.051126766949892044,
0.03145120292901993,
-0.08879... |
4a12c2e8-0b81-4ecb-a609-cec9db87f116 | Using external storage for data storage {#table_engine-mergetree-s3}
MergeTree
family table engines can store data to
S3
,
AzureBlobStorage
,
HDFS
using a disk with types
s3
,
azure_blob_storage
,
hdfs
accordingly. See
configuring external storage options
for more details.
Example for
S3
as external st... | {"source_file": "mergetree.md"} | [
0.00687426095828414,
-0.05835844948887825,
-0.12708380818367004,
0.016041448339819908,
0.0031401761807501316,
0.051555972546339035,
-0.010573972947895527,
0.0005125837633386254,
0.013581151142716408,
0.11055309325456619,
0.00857712421566248,
-0.001804481027647853,
0.10797709226608276,
-0.0... |
f08c07f6-fc3f-43d5-99ac-3807ba64ec7b | _part_data_version
β Data version of part (either min block number or mutation version).
_partition_value
β Values (a tuple) of a
partition by
expression.
_sample_factor
β Sample factor (from the query).
_block_number
β Original number of block for row that was assigned at insert, persisted on merges when s... | {"source_file": "mergetree.md"} | [
-0.015801090747117996,
-0.04872981086373329,
-0.052591193467378616,
0.0486910380423069,
-0.015619914047420025,
-0.049021873623132706,
0.013867408968508244,
0.0665273442864418,
-0.022523565217852592,
0.04410269856452942,
0.06624308228492737,
-0.03572715073823929,
0.027585135772824287,
-0.07... |
4461a111-56c8-4331-8d1a-317ecf439efa | Supported operations {#supported-operations}
| | Equality filters (==) | Range filters (
>, >=, <, <=
) |
|-----------|-----------------------|------------------------------|
| CountMin | β | β |
| MinMax | β | β ... | {"source_file": "mergetree.md"} | [
0.04712921753525734,
-0.01916884258389473,
-0.05195416882634163,
0.029187187552452087,
-0.07787033915519714,
-0.006713891867548227,
-0.014282984659075737,
0.09735393524169922,
-0.050248999148607254,
0.05172121524810791,
0.046710819005966187,
-0.05684714764356613,
0.04532710090279579,
-0.05... |
fc01ba7e-d14e-4122-bb9f-738899cceb1d | description: 'Documentation for Exact and Approximate Vector Search'
keywords: ['vector similarity search', 'ann', 'knn', 'hnsw', 'indices', 'index', 'nearest neighbor', 'vector search']
sidebar_label: 'Exact and Approximate Vector Search'
slug: /engines/table-engines/mergetree-family/annindexes
title: 'Exact and Appro... | {"source_file": "annindexes.md"} | [
-0.056323252618312836,
-0.013415762223303318,
-0.01309642568230629,
-0.05102090165019035,
0.08157609403133392,
-0.048563916236162186,
-0.033868830651044846,
-0.01894383691251278,
0.03955143317580223,
-0.019752074033021927,
-0.013917995616793633,
0.0006685171974822879,
0.032481640577316284,
... |
92a0a9ab-45b8-4766-a261-5fc684805df2 | WITH [0., 2.] AS reference_vec
SELECT id, vec
FROM tab
ORDER BY L2Distance(vec, reference_vec) ASC
LIMIT 3;
```
returns
result
ββidββ¬βvecββββββ
1. β 6 β [0,2] β
2. β 7 β [0,2.1] β
3. β 8 β [0,2.2] β
ββββββ΄ββββββββββ
Approximate vector search {#approximate-nearest-neighbor-search}
Vector Similarity In... | {"source_file": "annindexes.md"} | [
-0.004547452088445425,
-0.08788371831178665,
-0.01879505254328251,
-0.031193986535072327,
0.043707139790058136,
-0.0794128030538559,
-0.011131147854030132,
-0.005687818396836519,
-0.029647262766957283,
-0.030034054070711136,
0.016931576654314995,
0.007809519302099943,
0.0027135570999234915,
... |
e85eeb04-1f96-49e5-9f64-2646fb147d54 | sql
CREATE TABLE table
(
[...],
vectors Array(Float*),
INDEX index_name vectors TYPE vector_similarity('hnsw', <distance_function>, <dimensions>[, <quantization>, <hnsw_max_connections_per_layer>, <hnsw_candidate_list_size_for_construction>]) [GRANULARITY N]
)
ENGINE = MergeTree
ORDER BY [...]
These HNSW-specif... | {"source_file": "annindexes.md"} | [
0.07992123812437057,
-0.00667976401746273,
-0.04486937075853348,
-0.06895536929368973,
-0.023082399740815163,
0.004243628587573767,
-0.026236971840262413,
0.01555441040545702,
-0.08180899918079376,
-0.04949558153748512,
0.007915995083749294,
0.0062275417149066925,
-0.010221117176115513,
-0... |
defd67fd-95c9-4874-a0d5-b477a767dda6 | text
Storage consumption = Number of vectors * Dimension * Size of column data type
Example for the
dbpedia dataset
:
text
Storage consumption = 1 million * 1536 * 4 (for Float32) = 6.1 GB
The vector similarity index must be fully loaded from disk into main memory to perform searches.
Similarly, the vector index... | {"source_file": "annindexes.md"} | [
0.05746820569038391,
-0.025080077350139618,
-0.1392301768064499,
0.06637616455554962,
0.010094334371387959,
-0.03560500591993332,
0.0054758633486926556,
0.0419054739177227,
0.010341043584048748,
0.03380490094423294,
-0.02643425762653351,
0.017883606255054474,
0.060211651027202606,
-0.04639... |
1b33a372-9f0b-46bd-bcab-5cc68d4c6314 | As an example, query
sql
EXPLAIN indexes = 1
WITH [0.462, 0.084, ..., -0.110] AS reference_vec
SELECT id, vec
FROM tab
ORDER BY L2Distance(vec, reference_vec) ASC
LIMIT 10;
may return
result
ββexplainββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
1. β Expression (P... | {"source_file": "annindexes.md"} | [
0.04820564389228821,
-0.08006281405687332,
-0.022103475406765938,
-0.011382637545466423,
0.08298856765031815,
-0.05187676101922989,
0.029302041977643967,
0.0008022655383683741,
-0.016967032104730606,
0.08904466778039932,
-0.03438984602689743,
-0.0033648398239165545,
0.06938128918409348,
-0... |
274f2efc-8813-4fb4-8a26-9a7ffe264bc7 | :::tip
To enforce index usage, you can run the SELECT query with setting
force_data_skipping_indexes
(provide the index name as setting value).
:::
Post-filtering and Pre-filtering
Users may optionally specify a
WHERE
clause with additional filter conditions for the SELECT query.
ClickHouse will evaluate these ... | {"source_file": "annindexes.md"} | [
-0.021018117666244507,
0.003864262718707323,
0.02568894997239113,
-0.030045298859477043,
0.026664825156331062,
0.013266300782561302,
0.01323017943650484,
-0.0929548591375351,
0.016979897394776344,
-0.0161786749958992,
-0.006796145811676979,
0.050784289836883545,
0.002155182883143425,
-0.01... |
f4d5e603-870c-45a9-b76a-22918053fd2b | For finer control over post-filtering vs. pre-filtering, two settings can be used:
Setting
vector_search_filter_strategy
(default:
auto
which implements above heuristics) may be set to
prefilter
.
This is useful to force pre-filtering in cases where the additional filter conditions are extremely selective.
As an... | {"source_file": "annindexes.md"} | [
-0.027134664356708527,
0.04432275518774986,
-0.033515848219394684,
0.021384328603744507,
0.00556469801813364,
0.017586665228009224,
-0.0039055501110851765,
-0.03689563274383545,
0.004985074512660503,
0.029382484033703804,
-0.019346926361322403,
-0.029260694980621338,
0.013169713318347931,
... |
c5f8dd12-bb7d-41a0-907d-695545248bb9 | ClickHouse therefore provides an optimization which disables rescoring and returns the most similar vectors and their distances directly from the index.
The optimization is enabled by default, see setting
vector_search_with_rescoring
.
The way it works at a high level is that ClickHouse makes the most similar vectors ... | {"source_file": "annindexes.md"} | [
-0.02698151208460331,
-0.07091598957777023,
-0.07759145647287369,
-0.05349650979042053,
0.048936039209365845,
-0.004239732399582863,
-0.022745249792933464,
-0.0017293953569605947,
-0.010842837393283844,
-0.015933893620967865,
0.005175525322556496,
0.0019031530246138573,
0.003371895756572485,... |
fbc063f4-4b2d-41c1-a58a-6e2f055f2a3f | sql
CREATE TABLE tab(id Int32, vec Array(Float32) CODEC(NONE), INDEX idx vec TYPE vector_similarity('hnsw', 'L2Distance', 2)) ENGINE = MergeTree ORDER BY id;
Tuning index creation
The life cycle of vector similarity indexes is tied to the life cycle of parts.
In other words, whenever a new part with defined vector ... | {"source_file": "annindexes.md"} | [
0.00944194570183754,
-0.04118262976408005,
-0.05776114761829376,
-0.001779178623110056,
-0.039881981909275055,
-0.06965560466051102,
-0.016154291108250618,
-0.02783391810953617,
-0.014153198339045048,
-0.03139391168951988,
0.01222240086644888,
0.013021299615502357,
-0.019420932978391647,
-... |
cc824877-3fd5-4d1f-af34-67c0ffc2913f | The cache hits and misses for a query with some query id can be obtained from
system.query_log
:
```sql
SYSTEM FLUSH LOGS query_log;
SELECT ProfileEvents['VectorSimilarityIndexCacheHits'], ProfileEvents['VectorSimilarityIndexCacheMisses']
FROM system.query_log
WHERE type = 'QueryFinish' AND query_id = '<...>'
ORDE... | {"source_file": "annindexes.md"} | [
0.04250573366880417,
0.00774817168712616,
-0.04188104718923569,
0.07560993731021881,
-0.0007204260909929872,
-0.06799472123384476,
0.042066700756549835,
-0.005207034759223461,
0.03807325288653374,
0.008648446761071682,
-0.02526753954589367,
0.03514286130666733,
-0.051528409123420715,
-0.05... |
d7e02147-11be-4110-8853-3309d21c2c85 | params = {'search_v': search_v}
result = chclient.query(
"SELECT id FROM items
ORDER BY cosineDistance(vector, %(search_v)s)
LIMIT 10",
parameters = params)
```
Embedding vectors (
search_v
in above snippet) could have a very large dimension.
For example, OpenAI provides models that generate embedding... | {"source_file": "annindexes.md"} | [
-0.042104244232177734,
-0.011166388168931007,
-0.07713986188173294,
0.06550333648920059,
-0.012560578994452953,
-0.06492046266794205,
-0.013397176750004292,
0.02541438862681389,
0.011895472183823586,
-0.054709672927856445,
-0.07203228026628494,
-0.010037417523562908,
0.09755340218544006,
-... |
afa4de18-8b43-4ece-87c2-e3bb92e8534a | Differences to regular skipping indexes {#differences-to-regular-skipping-indexes}
As all regular
skipping indexes
, vector similarity indexes are constructed over granules and each indexed block consists of
GRANULARITY = [N]
-many granules (
[N]
= 1 by default for normal skipping indexes).
For example, if the pri... | {"source_file": "annindexes.md"} | [
0.006866627372801304,
0.010888820514082909,
0.0382956936955452,
-0.03588017448782921,
0.04609650745987892,
-0.05827443301677704,
-0.04964645951986313,
-0.05068773403763771,
0.042118147015571594,
-0.04846547171473503,
-0.008268320001661777,
0.039359159767627716,
0.018758518621325493,
-0.026... |
6404987b-859f-47d7-8d0f-2b3191518368 | Example {#approximate-nearest-neighbor-search-example}
```sql
CREATE TABLE tab(id Int32, vec Array(Float32), INDEX idx vec TYPE vector_similarity('hnsw', 'L2Distance', 2)) ENGINE = MergeTree ORDER BY id;
INSERT INTO tab VALUES (0, [1.0, 0.0]), (1, [1.1, 0.0]), (2, [1.2, 0.0]), (3, [1.3, 0.0]), (4, [1.4, 0.0]), (5, ... | {"source_file": "annindexes.md"} | [
0.056434761732816696,
0.0067421868443489075,
0.008527669124305248,
-0.06357549130916595,
0.048814259469509125,
-0.0494355708360672,
0.02059287019073963,
-0.022121313959360123,
-0.07850749790668488,
-0.026538154110312462,
-0.028327951207756996,
-0.03216511011123657,
0.022208016365766525,
-0... |
34e4e854-a8d4-46c6-a5a6-14deb2ef6fd7 | Where:
*
element_type
β the type of each vector element. Supported types are
BFloat16
,
Float32
, and
Float64
*
dimension
β the number of elements in each vector
Creating a
QBit
Table and Adding Data {#qbit-create}
```sql
CREATE TABLE fruit_animal (
word String,
vec QBit(Float64, 5)
) ENGINE = Mer... | {"source_file": "annindexes.md"} | [
0.0588768906891346,
0.004114707000553608,
0.03460037708282471,
0.004569416865706444,
-0.023974288254976273,
0.016254767775535583,
0.031283777207136154,
-0.022896692156791687,
-0.010468674823641777,
0.024658657610416412,
0.06278003752231598,
-0.06299387663602829,
0.08176061511039734,
-0.062... |
70c08909-b00c-4723-83b8-60ef7ac9ab01 | Performance Considerations {#qbit-performance}
The performance benefit of
QBit
comes from reduced I/O operations, as less data needs to be read from storage when using lower precision. Moreover, when the
QBit
contains
Float32
data, if the precision parameter is 16 or below, there will be additional benefits fro... | {"source_file": "annindexes.md"} | [
-0.05565178394317627,
0.05945234000682831,
-0.08215431123971939,
-0.027899207547307014,
0.014282112009823322,
-0.03104117512702942,
-0.04777280241250992,
0.0157152246683836,
0.02465369738638401,
-0.0328187420964241,
-0.028850292786955833,
-0.007680573500692844,
0.08507072925567627,
-0.0519... |
ad772a26-fa57-4f28-8a4c-211df19cd841 | description: 'CoalescingMergeTree inherits from the MergeTree engine. Its key feature
is the ability to automatically store last non-null value of each column during part merges.'
sidebar_label: 'CoalescingMergeTree'
sidebar_position: 50
slug: /engines/table-engines/mergetree-family/coalescingmergetree
title: 'Coales... | {"source_file": "coalescingmergetree.md"} | [
-0.04868624359369278,
-0.008932751603424549,
-0.026312462985515594,
-0.002629965776577592,
0.0026987858582288027,
0.0013693406945094466,
-0.021087104454636574,
-0.03140898048877716,
-0.040377791970968246,
0.08290226757526398,
0.06276565045118332,
0.005155918654054403,
0.0012880123686045408,
... |
717e5028-15bb-4574-bb16-05998d86c0a3 | Usage example {#usage-example}
Consider the following table:
sql
CREATE TABLE test_table
(
key UInt64,
value_int Nullable(UInt32),
value_string Nullable(String),
value_date Nullable(Date)
)
ENGINE = CoalescingMergeTree()
ORDER BY key
Insert data to it:
sql
INSERT INTO test_table VALUES(1, NULL, ... | {"source_file": "coalescingmergetree.md"} | [
-0.014469809830188751,
0.03530903905630112,
-0.003587696235626936,
0.052096594125032425,
-0.10244419425725937,
0.027902763336896896,
-0.020491616800427437,
0.04819842800498009,
-0.04035356268286705,
0.07842347025871277,
0.08567478507757187,
0.011784556321799755,
0.020341146737337112,
-0.09... |
9da7abe8-9297-4081-bb80-c71a96db12f7 | description: 'Inherits from MergeTree but adds logic for collapsing rows during the
merge process.'
keywords: ['updates', 'collapsing']
sidebar_label: 'CollapsingMergeTree'
sidebar_position: 70
slug: /engines/table-engines/mergetree-family/collapsingmergetree
title: 'CollapsingMergeTree table engine'
doc_type: 'guide... | {"source_file": "collapsingmergetree.md"} | [
-0.04835052415728569,
0.048019859939813614,
0.05614285171031952,
0.056691545993089676,
-0.01680806651711464,
-0.04420365020632744,
-0.033405937254428864,
0.03127507492899895,
0.01132238283753395,
0.02770795114338398,
-0.004108560271561146,
0.11562442034482956,
0.006219399161636829,
-0.0882... |
83b95603-c537-4b4b-b07b-793881f65497 | Collapsing {#table_engine-collapsingmergetree-collapsing}
Data {#data}
Consider the situation where you need to save continually changing data for some given object.
It may sound logical to have one row per object and update it anytime something changes,
however, update operations are expensive and slow for the DBM... | {"source_file": "collapsingmergetree.md"} | [
-0.047051526606082916,
0.04821348562836647,
0.01130802184343338,
0.08807975053787231,
-0.04551586136221886,
-0.0559048093855381,
0.010559768415987492,
0.0400271862745285,
0.00004484376768232323,
0.05578760802745819,
0.0004446038219612092,
0.0761522501707077,
0.02931126579642296,
-0.0977387... |
ad40282e-0e0c-40f9-b883-4a7e1c0a8e29 | Long growing arrays in columns reduce the efficiency of the engine due to the increased load for writing. The more straightforward the data, the higher the efficiency.
The
SELECT
results depend strongly on the consistency of the object change history. Be accurate when preparing data for inserting. You can get unpre... | {"source_file": "collapsingmergetree.md"} | [
-0.022706013172864914,
0.01072007231414318,
-0.012971104122698307,
0.04618014395236969,
-0.01641947031021118,
-0.08254821598529816,
-0.0463007390499115,
-0.02634882554411888,
-0.01609223708510399,
0.017984513193368912,
0.007933152839541435,
0.06527792662382126,
-0.02789912559092045,
-0.128... |
dbab0f82-9e50-4a5d-b3a1-ff1786e9213b | as in the
example
below.
The aggregates
count
,
sum
and
avg
could be calculated this way.
The aggregate
uniq
could be calculated if an object has at least one non-collapsed state.
The aggregates
min
and
max
could not be calculated
because
CollapsingMergeTree
does not save the history of the collapse... | {"source_file": "collapsingmergetree.md"} | [
-0.04813409969210625,
0.0209970586001873,
0.019304072484374046,
0.10364401340484619,
-0.052115242928266525,
0.04484616592526436,
0.05331238731741905,
0.027100982144474983,
-0.026158232241868973,
0.02964240126311779,
0.0047972979955375195,
0.023865871131420135,
0.06681680679321289,
-0.01953... |
b4b99862-ed76-48aa-99ee-4bd93575f45d | text
βββββββββββββββUserIDββ¬βPageViewsββ¬βDurationββ
β 4324182021466249494 β 6 β 185 β
βββββββββββββββββββββββ΄ββββββββββββ΄βββββββββββ
If we do not need aggregation and want to force collapsing, we can also use the
FINAL
modifier for
FROM
clause.
sql
SELECT * FROM UAct FINAL
text
βββββββββββββββUse... | {"source_file": "collapsingmergetree.md"} | [
-0.052871450781822205,
0.029018301516771317,
0.08198481798171997,
0.01789182238280773,
-0.04918541759252548,
-0.026155253872275352,
0.07602982223033905,
-0.022195760160684586,
0.003930181264877319,
0.005368134472519159,
0.07703234255313873,
0.06045788154006004,
0.007783412467688322,
-0.086... |
a9847532-1fe2-44da-b6fb-9efc7ad8d4eb | description: 'Learn how to add a custom partitioning key to MergeTree tables.'
sidebar_label: 'Custom Partitioning Key'
sidebar_position: 30
slug: /engines/table-engines/mergetree-family/custom-partitioning-key
title: 'Custom Partitioning Key'
doc_type: 'guide'
Custom partitioning key
:::note
In most cases you do... | {"source_file": "custom-partitioning-key.md"} | [
-0.0064798640087246895,
0.003534961026161909,
0.02556176297366619,
-0.000715973787009716,
-0.055385466665029526,
-0.025021759793162346,
0.0058102901093661785,
0.0637950748205185,
-0.011374866589903831,
0.040554229170084,
0.03007054328918457,
-0.0021854282822459936,
0.03451944515109062,
-0.... |
1bdfdaab-fbb8-4eec-b88c-8882bfc8f7be | Use the
system.parts
table to view the table parts and partitions. For example, let's assume that we have a
visits
table with partitioning by month. Let's perform the
SELECT
query for the
system.parts
table:
sql
SELECT
partition,
name,
active
FROM system.parts
WHERE table = 'visits'
text
ββparti... | {"source_file": "custom-partitioning-key.md"} | [
0.011283869855105877,
-0.0635061040520668,
0.041517749428749084,
0.06318928301334381,
-0.0190579853951931,
-0.017048709094524384,
0.11383233964443207,
0.042565491050481796,
0.007548855617642403,
-0.015776950865983963,
-0.0018324722768738866,
-0.049954552203416824,
0.017160478979349136,
-0.... |
5ef2d007-3dec-4cb1-a3f4-017ec9ba04e1 | Another way to view a set of parts and partitions is to go into the directory of the table:
/var/lib/clickhouse/data/<database>/<table>/
. For example:
bash
/var/lib/clickhouse/data/default/visits$ ls -l
total 40
drwxr-xr-x 2 clickhouse clickhouse 4096 Feb 1 16:48 201901_1_3_1
drwxr-xr-x 2 clickhouse clickhouse 409... | {"source_file": "custom-partitioning-key.md"} | [
0.04489690065383911,
-0.06732109934091568,
0.02140861749649048,
0.01550640631467104,
0.02230835147202015,
-0.03405732661485672,
0.05319919064640999,
-0.000004553942744678352,
0.0019904158543795347,
-0.006962998304516077,
0.04228363186120987,
-0.040353547781705856,
0.022228015586733818,
-0.... |
dcea04b9-4ef6-4beb-92fb-713dac1221ff | :::note
Performance of such a query heavily depends on the table layout. Because of that the optimisation is not enabled by default.
:::
The key factors for a good performance:
number of partitions involved in the query should be sufficiently large (more than
max_threads / 2
), otherwise query will under-utilize... | {"source_file": "custom-partitioning-key.md"} | [
-0.028688989579677582,
-0.05234793946146965,
-0.022024841979146004,
0.014333329163491726,
-0.010595847852528095,
-0.04141688346862793,
-0.010640336200594902,
-0.00010498741903575137,
-0.024154651910066605,
0.004507360048592091,
0.00804454181343317,
0.017563577741384506,
0.02381598763167858,
... |
808caa10-4ef8-4de5-b77f-515c45fdb775 | description: 'Quickly find search terms in text.'
keywords: ['full-text search', 'text index', 'index', 'indices']
sidebar_label: 'Full-text Search using Text Indexes'
slug: /engines/table-engines/mergetree-family/invertedindexes
title: 'Full-text Search using Text Indexes'
doc_type: 'reference'
import PrivatePrevi... | {"source_file": "invertedindexes.md"} | [
-0.005659335292875767,
0.017205316573381424,
-0.004681115970015526,
0.08495399355888367,
0.007584515027701855,
-0.003159881569445133,
0.042018115520477295,
-0.02272319234907627,
-0.0033828981686383486,
-0.0002009562886087224,
0.06486912816762924,
0.04098980873823166,
0.06598450243473053,
-... |
14766834-ccf5-4894-8372-8df6a4853a02 | ngrams(N)
splits strings into equally large
N
-grams (also see function
ngrams
).
The ngram length can be specified using an optional integer parameter between 2 and 8, for example,
tokenizer = ngrams(3)
.
The default ngram size, if not specified explicitly (for example,
tokenizer = ngrams
), is 3.
array
per... | {"source_file": "invertedindexes.md"} | [
-0.03196723759174347,
-0.018824301660060883,
-0.04655737802386284,
-0.05703011155128479,
-0.0016650951001793146,
-0.0152060491964221,
0.024829577654600143,
0.06735838204622269,
0.011376298032701015,
-0.043399378657341,
-0.01811436377465725,
0.03528182581067085,
-0.009291107766330242,
-0.00... |
d1ec582c-0f16-4682-9627-99734ae52eac | The preprocessor expression must transform an input value of type
String
or
FixedString
to a value of the same type.
Examples:
-
INDEX idx(col) TYPE text(tokenizer = 'splitByNonAlpha', preprocessor = lower(col))
-
INDEX idx(col) TYPE text(tokenizer = 'splitByNonAlpha', preprocessor = substringIndex(col, '\n', ... | {"source_file": "invertedindexes.md"} | [
0.010606684722006321,
0.012255958281457424,
-0.0011557467514649034,
0.039804838597774506,
-0.04363448545336723,
0.019873138517141342,
0.07673978060483932,
0.06038171797990799,
-0.008906817063689232,
0.05353757366538048,
0.006215800531208515,
-0.03859676793217659,
0.033446840941905975,
-0.0... |
852a939d-af57-438b-81de-ad09743d897a | Supported functions {#functions-support}
The text index can be used if text functions are used in the
WHERE
clause of a SELECT query:
sql
SELECT [...]
FROM [...]
WHERE string_search_function(column_with_text_index)
=
and
!=
{#functions-example-equals-notequals}
=
(
equals
) and
!=
(
notEquals
) match t... | {"source_file": "invertedindexes.md"} | [
-0.030553152784705162,
0.040598101913928986,
0.036971546709537506,
0.012046359479427338,
0.00044751589302904904,
-0.011618846096098423,
0.0545947402715683,
-0.017932754009962082,
-0.03248296305537224,
-0.042667124420404434,
-0.009359026327729225,
0.02232273854315281,
0.07619135081768036,
-... |
5115e3eb-d676-4562-ad3d-44555623a11a | Example:
sql
SELECT count() FROM tab WHERE hasToken(comment, 'clickhouse');
Functions
hasToken
and
hasTokenOrNull
are the most performant functions to use with the
text
index.
hasAnyTokens
and
hasAllTokens
{#functions-example-hasanytokens-hasalltokens}
Functions
hasAnyTokens
and
hasAllTokens
match ... | {"source_file": "invertedindexes.md"} | [
0.011733253486454487,
-0.046620145440101624,
-0.008882047608494759,
0.09309898316860199,
-0.055355433374643326,
0.04421239346265793,
0.11483263224363327,
0.03212318941950798,
0.05904209613800049,
-0.04223135486245155,
0.00507349194958806,
-0.029805541038513184,
0.10419809073209763,
-0.0822... |
7ae0b5c7-dc25-463e-9ec6-e3267bec31ac | As the platform grows, this becomes increasingly slow because the query must examine every keywords array in every row.
To overcome this performance issue, we can define a text index for the
keywords
that creates a search-optimized structure that pre-processes all keywords, enabling instant lookups:
sql
ALTER TAB... | {"source_file": "invertedindexes.md"} | [
0.03565194830298424,
0.0425279401242733,
0.04208260029554367,
0.03693953529000282,
0.013293437659740448,
-0.04768545553088188,
0.09322008490562439,
-0.004666037391871214,
0.03645479306578636,
0.0744117945432663,
0.011437596753239632,
0.026534784585237503,
0.05757373198866844,
-0.0206277873... |
5477fe7d-35c9-463b-a7e2-3b669c217c4e | Since a text index is a skip index, these data structures exist logically per index granule.
During index creation, three files are created (per part):
Dictionary blocks file (.dct)
The tokens in an index granule are sorted and stored in dictionary blocks of 128 tokens each (the block size is configurable by para... | {"source_file": "invertedindexes.md"} | [
-0.08143149316310883,
0.040432434529066086,
-0.04724372923374176,
0.03829898685216904,
0.026736486703157425,
-0.06444697082042694,
0.041479289531707764,
0.01839071698486805,
0.0902184471487999,
-0.026183834299445152,
0.02801143378019333,
0.11449920386075974,
0.03240754082798958,
-0.0645116... |
b1b56cc6-3b35-4925-8d68-2fbb698937e8 | Also, the text index must be fully materialized to use direct reading (use
ALTER TABLE ... MATERIALIZE INDEX
for that).
Supported functions
The direct read optimization supports functions
hasToken
,
hasAllTokens
, and
hasAnyTokens
.
These functions can also be combined by AND, OR, and NOT operators.
The WHERE c... | {"source_file": "invertedindexes.md"} | [
0.03469472751021385,
0.02824511006474495,
0.008365494199097157,
0.13084490597248077,
-0.0204171035438776,
0.02699197642505169,
0.04932105541229248,
0.06064514070749283,
-0.007181954104453325,
0.06558012217283249,
-0.002137988805770874,
0.02708558924496174,
0.020312130451202393,
-0.06995154... |
e77dde58-b14b-43aa-9cfe-9b1dea2570e0 | The 28.7M rows are in a Parquet file in S3 - let's insert them into the
hackernews
table:
sql
INSERT INTO hackernews
SELECT * FROM s3Cluster(
'default',
'https://datasets-documentation.s3.eu-west-3.amazonaws.com/hackernews/hacknernews.parquet',
'Parquet',
'
id UInt64,
del... | {"source_file": "invertedindexes.md"} | [
-0.0562204085290432,
-0.060093022882938385,
-0.07640758156776428,
0.0446489080786705,
0.015624837949872017,
-0.003153197467327118,
0.011116940528154373,
-0.051177144050598145,
-0.004279317334294319,
0.07209329307079315,
0.025497252121567726,
-0.00952512864023447,
0.11480247229337692,
-0.07... |
1e098f9b-86dd-41ed-a257-df0f430dd76d | ββcount()ββ
β 408426 β
βββββββββββ
1 row in set. Elapsed: 1.329 sec. Processed 28.74 million rows, 9.72 GB
```
Direct read enabled (Fast index read)
```sql
SELECT count()
FROM hackernews
WHERE hasAnyTokens(comment, 'love ClickHouse')
SETTINGS query_plan_direct_read_from_text_index = 1, use_skip_indexes_on_data_r... | {"source_file": "invertedindexes.md"} | [
-0.004802973475307226,
-0.024061596021056175,
-0.02084985561668873,
0.09036203473806381,
-0.0007967985002323985,
-0.0313061848282814,
0.06619030982255936,
-0.014872231520712376,
0.045792657881975174,
0.016722630709409714,
0.08696240186691284,
0.013644164428114891,
0.09610596299171448,
-0.0... |
f2e89726-40e5-4a4d-b550-0eddf613b3da | ββcount()ββ
β 769 β
βββββββββββ
1 row in set. Elapsed: 0.013 sec. Processed 25.87 million rows, 51.73 MB
```
By combining the results from the index, the direct read query is 34 times faster (0.450s vs 0.013s) and avoids reading the 9.58 GB of column data.
For this specific case,
hasAnyTokens(comment, ['ClickH... | {"source_file": "invertedindexes.md"} | [
-0.020819630473852158,
0.01275116391479969,
-0.05558936297893524,
0.06699177622795105,
-0.06650884449481964,
-0.10097312182188034,
0.03227118030190468,
-0.005692924372851849,
0.02221745252609253,
0.013390484265983105,
0.08534311503171921,
0.042415276169776917,
0.04049639776349068,
-0.06834... |
3f02953d-10e8-4334-ae07-ef783b2127c8 | Header cache settings {#text-index-tuning-header-cache}
| Setting | Description | Default |
|---... | {"source_file": "invertedindexes.md"} | [
0.027817564085125923,
0.082256980240345,
-0.018692055717110634,
0.013562997803092003,
-0.04368772730231285,
-0.028633523732423782,
0.013866747729480267,
0.039691369980573654,
0.021744202822446823,
-0.047308288514614105,
-0.02034350112080574,
-0.02480853535234928,
-0.010387187823653221,
-0.... |
c2d41e9b-b1de-4cfb-8189-59d60485f37c | description: 'SummingMergeTree inherits from the MergeTree engine. Its key feature
is the ability to automatically sum numeric data during part merges.'
sidebar_label: 'SummingMergeTree'
sidebar_position: 50
slug: /engines/table-engines/mergetree-family/summingmergetree
title: 'SummingMergeTree table engine'
doc_type... | {"source_file": "summingmergetree.md"} | [
-0.022084172815084457,
-0.013636809773743153,
0.02291264571249485,
0.04796033725142479,
-0.015686169266700745,
-0.029527027159929276,
-0.016479508951306343,
0.03185032308101654,
-0.006549653597176075,
0.023993991315364838,
0.000029474440452759154,
0.006313589867204428,
-0.0055396840907633305... |
dbb3a66e-bee5-4340-af4f-d41be58f819c | Usage example {#usage-example}
Consider the following table:
sql
CREATE TABLE summtt
(
key UInt32,
value UInt32
)
ENGINE = SummingMergeTree()
ORDER BY key
Insert data to it:
sql
INSERT INTO summtt VALUES(1,1),(1,2),(2,1)
ClickHouse may sum all the rows not completely (
see below
), so we use an aggreg... | {"source_file": "summingmergetree.md"} | [
-0.05808980390429497,
-0.025981148704886436,
0.0404241718351841,
0.03130624070763588,
-0.06531905382871628,
-0.045909419655799866,
0.05484354496002197,
0.007656192407011986,
0.057784128934144974,
0.026439674198627472,
0.035914693027734756,
0.026129182428121567,
0.05268959701061249,
-0.0963... |
46eae063-b087-4cd7-b9ae-b2b7369dc493 | OPTIMIZE TABLE nested_sum FINAL; -- emulate merge
SELECT * FROM nested_sum;
ββββββββdateββ¬βsiteββ¬βhitsMap.browserββββββββββββββββββββ¬βhitsMap.impsββ¬βhitsMap.clicksββ
β 2020-01-01 β 10 β ['Chrome'] β [4] β [3] β
β 2020-01-01 β 12 β ['Chrome','Firefox','IE','Opera'] β [20... | {"source_file": "summingmergetree.md"} | [
0.015867147594690323,
-0.01933637075126171,
0.07133551687002182,
0.043299756944179535,
-0.00955338403582573,
-0.052584994584321976,
0.06810065358877182,
-0.01088617742061615,
-0.060476601123809814,
-0.0051141283474862576,
0.011518360115587711,
-0.0768439844250679,
0.048931095749139786,
-0.... |
fdaf88c1-3630-473b-8864-ee50a185aec3 | description: 'Documentation for MergeTree Engine Family'
sidebar_label: 'MergeTree Family'
sidebar_position: 10
slug: /engines/table-engines/mergetree-family/
title: 'MergeTree Engine Family'
doc_type: 'reference'
MergeTree engine family
Table engines from the MergeTree family are the core of ClickHouse data stor... | {"source_file": "index.md"} | [
-0.07605906575918198,
-0.06906133145093918,
0.018338436260819435,
-0.009677139110863209,
-0.021274592727422714,
-0.06836183369159698,
-0.07267128676176071,
0.05756542831659317,
-0.053832441568374634,
0.004233669489622116,
0.010059935040771961,
0.016678432002663612,
-0.0010566061828285456,
... |
b97a7662-8e21-4842-98b6-1c66eb27af72 | description: 'Replaces all rows with the same primary key (or more accurately, with
the same
sorting key
)
with a single row (within a single data part) that stores a combination of states
of aggregate functions.'
sidebar_label: 'AggregatingMergeTree'
sidebar_position: 60
slug: /engines/table-engines/mergetree-f... | {"source_file": "aggregatingmergetree.md"} | [
-0.041456155478954315,
-0.06234116479754448,
0.03036041185259819,
0.02129177376627922,
-0.04750135540962219,
0.002971136011183262,
-0.0029947347939014435,
-0.005320470780134201,
0.013063004240393639,
0.015893127769231796,
0.035660888999700546,
0.027233732864260674,
0.007364973891526461,
-0... |
bee2da02-a08a-4797-bd5b-73ea0f0b4a0e | Example of an aggregated materialized view {#example-of-an-aggregated-materialized-view}
The following example assumes that you have a database named
test
. Create it if it doesn't already exist using the command below:
sql
CREATE DATABASE test;
Now create the table
test.visits
that contains the raw data:
sq... | {"source_file": "aggregatingmergetree.md"} | [
0.01774877868592739,
-0.07676951587200165,
-0.04128053039312363,
0.07242205739021301,
-0.1417081654071808,
0.018919438123703003,
0.01722981408238411,
0.05213707685470581,
-0.01255936548113823,
0.015394985675811768,
-0.0007092071464285254,
-0.04188996180891991,
0.05943165346980095,
-0.04062... |
69a19be7-0d4c-4818-970c-12d12827d253 | text
ββββββββββββββββStartDateββ¬βVisitsββ¬βUsersββ
β 2022-11-03 03:27:11.000 β 16 β 3 β
β 2022-11-26 07:00:31.000 β 5 β 1 β
βββββββββββββββββββββββββββ΄βββββββββ΄ββββββββ
In some cases, you might want to avoid pre-aggregating rows at insert time to shift the cost of aggregation from insert time
to merge... | {"source_file": "aggregatingmergetree.md"} | [
-0.019395150244235992,
-0.05253973230719566,
-0.0026402806397527456,
0.0886494517326355,
-0.06252578645944595,
0.0250970758497715,
0.04376290366053581,
-0.007036240305751562,
0.03504323586821556,
0.010432176291942596,
0.0837957039475441,
-0.043196432292461395,
0.04268736392259598,
-0.03043... |
8ae27bf0-a80e-4080-9038-16a4861d5969 | description: 'Designed for thinning and aggregating/averaging (rollup) Graphite data.'
sidebar_label: 'GraphiteMergeTree'
sidebar_position: 90
slug: /engines/table-engines/mergetree-family/graphitemergetree
title: 'GraphiteMergeTree table engine'
doc_type: 'guide'
GraphiteMergeTree table engine
This engine is des... | {"source_file": "graphitemergetree.md"} | [
-0.05578206852078438,
-0.025167714804410934,
-0.039310213178396225,
0.044069740921258926,
-0.04552794620394707,
-0.029605191200971603,
-0.012083016335964203,
0.07551740109920502,
-0.12295997887849808,
0.07596581429243088,
0.05568283423781395,
0.010682289488613605,
0.027843739837408066,
-0.... |
8a4aa27a-83a6-4184-98d9-2a97e4be5c79 | Rollup configuration structure:
required-columns
patterns
Required columns {#required-columns}
path_column_name
{#path_column_name}
path_column_name
β The name of the column storing the metric name (Graphite sensor). Default value:
Path
.
time_column_name
{#time_column_name}
time_column_name
β The... | {"source_file": "graphitemergetree.md"} | [
-0.07079971581697464,
0.044955626130104065,
-0.07439479231834412,
-0.03569736331701279,
-0.028083348646759987,
-0.06057902052998543,
-0.049406860023736954,
0.02665485069155693,
-0.07184233516454697,
0.048866283148527145,
0.035184428095817566,
-0.04848126694560051,
-0.057348281145095825,
-0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.