Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: 执行计划有错误

[TiDB Usage Environment] Production Environment / Testing / Poc
[TiDB Version] 7.5
[Reproduction Path] What operations were performed to cause the issue
[Encountered Issue: Problem Phenomenon and Impact]
CREATE TABLE `win_ticket` (
`draw_id` int(11) NOT NULL,
`ticket_no` varchar(30) NOT NULL,
`win_prz_lvl` int(11) NOT NULL,
`clerk_id` int(11) unsigned DEFAULT NULL,
`ticket_pwd` varchar(40) DEFAULT NULL,
`sale_time` datetime DEFAULT NULL,
`chances` int(11) unsigned DEFAULT NULL,
`selection` varchar(4000) DEFAULT NULL,
`multiple` int(11) unsigned DEFAULT NULL,
`transaction_id` int(11) DEFAULT NULL,
`term_id` int(11) unsigned DEFAULT NULL,
`prz_cnt` decimal(50,12) DEFAULT NULL,
`prz_amt` decimal(50,2) DEFAULT NULL,
`tax_amt` decimal(50,2) DEFAULT NULL,
`paid_type` int(11) DEFAULT NULL,
`paid_time` datetime DEFAULT NULL,
`paid_operator_id` int(11) DEFAULT NULL,
`withdraw_amt` int(11) DEFAULT NULL,
`bno` int(11) DEFAULT NULL,
`eno` int(11) DEFAULT NULL,
`win_time` datetime NOT NULL,
`paid_term_id` int(11) DEFAULT NULL,
`end_paid_time` datetime DEFAULT NULL,
`win_selection_chances` int(11) DEFAULT NULL,
`payment_type` int(11) DEFAULT NULL,
PRIMARY KEY (`draw_id`,`ticket_no`,`win_prz_lvl`) /*T![clustered_index] CLUSTERED */,
KEY `ind_paid_time` (`paid_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
This table has an index on the paid_time
column, KEY ind_paid_time
(paid_time
), but I don’t know why the execution plan is having issues here.
Export statistics information
win_ticket.json (1.1 MB)