2019-10-11 15:22:30 +00:00
|
|
|
=DICTIONARY in Ordinary DB
|
2020-11-17 13:24:13 +00:00
|
|
|
CREATE DICTIONARY db_01018.dict1\n(\n `key_column` UInt64 DEFAULT 0,\n `second_column` UInt8 DEFAULT 1,\n `third_column` String DEFAULT \'qqq\'\n)\nPRIMARY KEY key_column\nSOURCE(CLICKHOUSE(HOST \'localhost\' PORT tcpPort() USER \'default\' TABLE \'table_for_dict\' PASSWORD \'\' DB \'database_for_dict_01018\'))\nLIFETIME(MIN 1 MAX 10)\nLAYOUT(FLAT())
|
2019-10-11 15:22:30 +00:00
|
|
|
dict1
|
|
|
|
1
|
2020-09-22 11:56:40 +00:00
|
|
|
db_01018 dict1
|
2019-10-11 15:22:30 +00:00
|
|
|
==DETACH DICTIONARY
|
|
|
|
0
|
|
|
|
==ATTACH DICTIONARY
|
|
|
|
dict1
|
|
|
|
1
|
2020-09-22 11:56:40 +00:00
|
|
|
db_01018 dict1
|
2019-10-11 15:22:30 +00:00
|
|
|
==DROP DICTIONARY
|
|
|
|
0
|
|
|
|
=DICTIONARY in Memory DB
|
2021-04-24 22:03:04 +00:00
|
|
|
CREATE DICTIONARY memory_db.dict2\n(\n `key_column` UInt64 DEFAULT 0 INJECTIVE,\n `second_column` UInt8 DEFAULT 1 EXPRESSION rand() % 222,\n `third_column` String DEFAULT \'qqq\'\n)\nPRIMARY KEY key_column\nSOURCE(CLICKHOUSE(HOST \'localhost\' PORT tcpPort() USER \'default\' TABLE \'table_for_dict\' PASSWORD \'\' DB \'database_for_dict_01018\'))\nLIFETIME(MIN 1 MAX 10)\nLAYOUT(FLAT())
|
|
|
|
dict2
|
|
|
|
1
|
|
|
|
memory_db dict2
|
2019-10-14 09:21:29 +00:00
|
|
|
=DICTIONARY in Lazy DB
|
2019-10-14 09:52:43 +00:00
|
|
|
=DROP DATABASE WITH DICTIONARY
|
|
|
|
dict4
|
|
|
|
dict4
|