2020-04-21 18:02:36 +00:00
|
|
|
CREATE TABLE dict_data (key UInt64, val UInt64) Engine=Memory();
|
|
|
|
CREATE DICTIONARY dict
|
|
|
|
(
|
|
|
|
key UInt64 DEFAULT 0,
|
|
|
|
val UInt64 DEFAULT 10
|
|
|
|
)
|
|
|
|
PRIMARY KEY key
|
2024-07-09 22:24:53 +00:00
|
|
|
SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() USER 'default' TABLE 'dict_data' PASSWORD '' DB currentDatabase()))
|
2020-04-21 18:02:36 +00:00
|
|
|
LIFETIME(MIN 0 MAX 0)
|
|
|
|
LAYOUT(FLAT());
|
|
|
|
|
2024-07-09 22:24:53 +00:00
|
|
|
SELECT query_count, status FROM system.dictionaries WHERE database = currentDatabase() AND name = 'dict';
|
|
|
|
SYSTEM RELOAD DICTIONARY dict;
|
|
|
|
SELECT query_count, status FROM system.dictionaries WHERE database = currentDatabase() AND name = 'dict';
|
|
|
|
SELECT dictGetUInt64('dict', 'val', toUInt64(0));
|
|
|
|
SELECT query_count, status FROM system.dictionaries WHERE database = currentDatabase() AND name = 'dict';
|