-- ========================================
-- 检查 fee_incomedetail 表索引
-- ========================================

-- 1. 查看所有索引
SHOW INDEX FROM fee_incomedetail;

-- 2. 检查 pay_time 是否有索引
SHOW INDEX FROM fee_incomedetail WHERE Column_name = 'pay_time';

-- 3. 检查 group_id 是否有索引
SHOW INDEX FROM fee_incomedetail WHERE Column_name = 'group_id';

-- ========================================
-- 如果没有索引，执行以下语句创建
-- ========================================

-- 单字段索引
-- CREATE INDEX idx_pay_time ON fee_incomedetail(pay_time);
-- CREATE INDEX idx_group_id ON fee_incomedetail(group_id);

-- 联合索引（推荐，查询更快）
-- CREATE INDEX idx_pay_time_group_id ON fee_incomedetail(pay_time, group_id);
