背景 今天在日常数据库检查中,发现一SQL运行时间特别长,于是抓取出来,进行优化. 优化前: 耗时:503s 返回:0 SQL代码 SELECT * FROM MM_PAYABLEMONEY_TD P WHERE P.DATATYPE IN ('132', '304', '313', '316', '323', '321', '330', '334', '338', '342', '346', '350', '351', '353', '355', '358', '359', '362', '3