ByConity: It's too slow to query Bucket CnchMergeTree statistics from system.cnch_parts.
Bug Report
It’s too slow to query Bucket CnchMergeTree statistics from system.cnch_parts.
Briefly describe the bug
It’s normal to query the statistics of Bucket CnchMergeTree from system.parts. It’s also normal to query the statistics of Bucket CnchMergeTree from system.cnch_tables. But it’s too slow to query the statistics of Bucket CnchMergeTree from system.cnch_parts, even though there aren’t any data in these Bucket CnchMergeTree tables.
How to Reproduce
- Create a database to store Bucket CnchMergeTree tables: bucket_database
- Create a Bucket CnchMergeTree tables in this database.
CREATE TABLE bucket_database.bucket1
(
`id` Int32,
`name` String,
`age` UInt8,
`age_group` UInt8,
`timestamp` DateTime
)
ENGINE = CnchMergeTree
PARTITION BY toDate(timestamp)
CLUSTER BY (id, toDate(timestamp)) INTO 10 BUCKETS SPLIT_NUMBER 100
ORDER BY id
- Create more than 60 Bucket CnchMergeTree tables without any data just like step2.
- Query It takes 5.8s from system.cnch_parts to query count of Bucket CnchMergeTree tables
SELECT database, count(*) FROM system.cnch_parts WHERE database ='bucket_database' GROUP BY database;
If to query other databases count statictics without Bucket CnchMergeTree from system.cnch_parts it cost less than 1s If to query Bucket CnchMergeTree count statictics from system.parts it cost less than 1s
Version
0.2.2
Deployment Mode
This is the deployment node information of my cluster:
5 FoundationDB node.
3 tso
3 server
3 resource-manager
1 daemon-manager
2 default-worker
2 write-worker
Does anyone face the similar problem?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (15 by maintainers)
This is because the FoundationDB is deployed on the SATA disk. After I deployed FoundationDB using SSD disk, the performance of ByConity querying FDB metadata was greatly improved, and the problem was solved. Thank you. @smmsmm1988