DL
SELECT * FROM system.zookeeper WHERE path = '/clickhouse/tables/1/log/' AND name IN ('metadata','columns')
Size: a a a
DL
DT
DL
DL
D
srv
Int32,port
Int32,t
DateTime,ms
UInt64,user_id
Int32 DEFAULT 0,proj
String,module
Nullable(String),proc
String,type
Enum8('info' = 0, 'debug' = 1, 'trace' = 2, 'warn' = 3, 'error' = 4, 'fatal' = 5, 'panic' = 6, 'success' = 7, 'syslog' = 8),mes
Nullable(String),pack
Nullable(String),market
Nullable(String),pair
Nullable(String),mail
Nullable(String),id
Nullable(String),sub_id
Nullable(String),event_id
Nullable(String)DL
DT
DL
srv
Int32,port
Int32,t
DateTime,ms
UInt64,user_id
Int32 DEFAULT 0,proj
String,module
Nullable(String),proc
String,type
Enum8('info' = 0, 'debug' = 1, 'trace' = 2, 'warn' = 3, 'error' = 4, 'fatal' = 5, 'panic' = 6, 'success' = 7, 'syslog' = 8),mes
Nullable(String),pack
Nullable(String),market
Nullable(String),pair
Nullable(String),mail
Nullable(String),id
Nullable(String),sub_id
Nullable(String),event_id
Nullable(String)DL
DL
DL
D
DC
2021.02.09 07:28:00.412261 [ 21805 ] {59dcd7bf-da8b-4737-b293-f0efb5b7c2e9} <Debug> executeQuery: (from 127.0.0.1:42870) SELECT count(*) FROM test_backup;
2021.02.09 07:28:00.416711 [ 21805 ] {59dcd7bf-da8b-4737-b293-f0efb5b7c2e9} <Error> executeQuery: Code: 225, e.displayText() = DB::Exception: Cannot get ZooKeeper (version 20.10.6.27 (official build)) (from 127.0.0.1:42870) (in query: SELECT count(*) FROM test_backup;), Stack trace (when copying this message, always include the lines below):
0. DB::StorageReplicatedMergeTree::getZooKeeper() const @ 0xe0783bb in /usr/bin/clickhouse
1. DB::StorageReplicatedMergeTree::getMaxAddedBlocks() const @ 0xe0da8cd in /usr/bin/clickhouse
2. DB::StorageReplicatedMergeTree::totalRows() const @ 0xe0db63d in /usr/bin/clickhouse
3. DB::InterpreterSelectQuery::executeFetchColumns(DB::QueryProcessingStage::Enum, DB::QueryPlan&, std::__1::shared_ptr<DB::PrewhereInfo> const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) @ 0xdb543d3 in /usr/bin/clickhouse
4. DB::InterpreterSelectQuery::executeImpl(DB::QueryPlan&, std::__1::shared_ptr<DB::IBlockInputStream> const&, std::__1::optional<DB::Pipe>) @ 0xdb4c46b in /usr/bin/clickhouse
5. DB::InterpreterSelectQuery::buildQueryPlan(DB::QueryPlan&) @ 0xdb4b9c6 in /usr/bin/clickhouse
6. DB::InterpreterSelectWithUnionQuery::execute() @ 0xdcf167d in /usr/bin/clickhouse
7. ? @ 0xde48568 in /usr/bin/clickhouse
8. DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool) @ 0xde4740d in /usr/bin/clickhouse
9. DB::TCPHandler::runImpl() @ 0xe4ee3a6 in /usr/bin/clickhouse
10. DB::TCPHandler::run() @ 0xe4fb1a7 in /usr/bin/clickhouse
11. Poco::Net::TCPServerConnection::start() @ 0x10cd40df in /usr/bin/clickhouse
12. Poco::Net::TCPServerDispatcher::run() @ 0x10cd5af1 in /usr/bin/clickhouse
13. Poco::PooledThread::run() @ 0x10e06c99 in /usr/bin/clickhouse
14. Poco::ThreadImpl::runnableEntry(void*) @ 0x10e02bca in /usr/bin/clickhouse
15. start_thread @ 0x7ea5 in /usr/lib64/libpthread-2.17.so
16. clone @ 0xfe96d in /usr/lib64/libc-2.17.so
DC
select * from table1 limit 10
и select * from table2 limit 10
. При одинаковом наборе полей в таблицах скорость работы запроса может отличаться в разы.DC
limit 10
?МЧ
D
SELECT * FROM system.zookeeper WHERE path =
'/clickhouse/tables/1/log/replicas/1' AND name IN ('metadata','columns')
SELECT * FROM system.zookeeper WHERE path =
'/clickhouse/tables/1/log/replicas/2' AND name IN ('metadata','columns')
...
DL
SELECT * FROM system.zookeeper WHERE path =
'/clickhouse/tables/1/log/replicas/1' AND name IN ('metadata','columns')
SELECT * FROM system.zookeeper WHERE path =
'/clickhouse/tables/1/log/replicas/2' AND name IN ('metadata','columns')
...
MM
Α