数据库:MariaDB,
单表记录:>7900万
语句1:select * from rgwsp_history where Station_Id_d = '58035' and BJTIME like '20140625%'
用时--4.976s
语句2:
select * from rgwsp_history where Station_Id_d = '58035' and (BJTIME = '2014061500' or BJTIME = '2014061501'
or BJTIME = '2014061502' or BJTIME = '2014061503' or BJTIME = '2014061504' or BJTIME = '2014061505'
or BJTIME = '2014061506' or BJTIME = '2014061507' or BJTIME = '2014061508' or BJTIME = '2014061509'
or BJTIME = '2014061510' or BJTIME = '2014061511' or BJTIME = '2014061512' or BJTIME = '2014061513'
or BJTIME = '2014061514' or BJTIME = '2014061515' or BJTIME = '2014061516' or BJTIME = '2014061517'
or BJTIME = '2014061518' or BJTIME = '2014061519' or BJTIME = '2014061520' or BJTIME = '2014061521'
or BJTIME = '2014061522' or BJTIME = '2014061523')
用时--0.018s
相差276倍