-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.severity/majorsig/plannerSIG: PlannerSIG: Plannertype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
- about 100k partition tables and each 10k rows
CREATE TABLE `sbtest1` (
`id` int NOT NULL AUTO_INCREMENT,
`k` int NOT NULL DEFAULT '0',
`c` char(120) NOT NULL DEFAULT '',
`pad` char(60) NOT NULL DEFAULT '',
`ec1` varchar(40) DEFAULT NULL,
`ec2` varchar(40) DEFAULT NULL,
`ec3` varchar(40) DEFAULT NULL,
`ec4` varchar(40) DEFAULT NULL,
`ec5` varchar(40) DEFAULT NULL,
`ec6` varchar(40) DEFAULT NULL,
`ec7` varchar(40) DEFAULT NULL,
`ec8` varchar(40) DEFAULT NULL,
`ec9` varchar(40) DEFAULT NULL,
`ec10` varchar(40) DEFAULT NULL,
PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */,
KEY `k_2` (`k`),
KEY `ek1` (`ec1`(30)),
KEY `ek2` (`ec2`(30)),
KEY `ek3` (`ec3`(30)),
KEY `ek4` (`ec4`(30))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin AUTO_INCREMENT=1087002
PARTITION BY RANGE (`id`)
(PARTITION `p1` VALUES LESS THAN (1001),
PARTITION `p2` VALUES LESS THAN (2001),
PARTITION `p3` VALUES LESS THAN (3001),
PARTITION `p4` VALUES LESS THAN (4001),
PARTITION `p5` VALUES LESS THAN (5001),
PARTITION `p6` VALUES LESS THAN (6001),
PARTITION `p7` VALUES LESS THAN (7001),
PARTITION `p8` VALUES LESS THAN (8001),
PARTITION `p9` VALUES LESS THAN (9001),
PARTITION `p10` VALUES LESS THAN (MAXVALUE))
- run dml on some of the tables
- execute analyze table
It takes about 3 seconds if not having dml workload
mysql> analyze table sbtest100.sbtest1;
Query OK, 0 rows affected, 10 warnings (21 min 48.62 sec)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
master
Release Version: v8.5.0
Edition: Community
Git Commit Hash: eb871f8
Git Branch: heads/refs/tags/v8.5.0
UTC Build Time: 2024-11-22 03:01:24
GoVersion: go1.23.3
Race Enabled: false
Check Table Before Drop: false
Store: tikv
Metadata
Metadata
Assignees
Labels
affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.severity/majorsig/plannerSIG: PlannerSIG: Plannertype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.