didi / KnowStreaming

一站式云原生实时流数据平台,通过0侵入、插件化构建企业级Kafka服务,极大降低操作、存储和管理实时流数据门槛
https://knowstreaming.com
GNU Affero General Public License v3.0
6.99k stars 1.28k forks source link

数据库保存的group元信息数据量过大,导致mysql数据库变慢 #1005

Closed Qyc1990 closed 1 year ago

Qyc1990 commented 1 year ago

环境信息

需要优化的功能点

建议如何优化

Qyc1990 commented 1 year ago

1. row ID: 178582413 USER: know_streaming HOST: x.x.x.x:58296 DB: know_streaming COMMAND: Query TIME: 262 STATE: Sending data INFO: SELECT id,cluster_phy_id,type,name,state,member_count,topic_members,partition_assignor,coordinator_id,create_time,update_time FROM ks_km_group

WHERE (cluster_phy_id = 5)

mysql> select count() from ks_km_group; +----------+ | count() | +----------+ | 3459044 | +----------+ 1 row in set (1.40 sec)

Qyc1990 commented 1 year ago

KnowStreaming version : KnowStreaming-3.3.0 Operating System version : CentOS Linux release 7.9.2009 (Core) Java version : jdk11.0.2