看符合createtime between '2019-01-01 00:00:00' and '2019-12-31 23:59:59' 的数据有多少
storeid=1
有多少
用子查询看看
select * from( select * from table where createtime between '2019-01-01 00:00:00' and '2019-12-31 23:59:59' ) where storeid=1
或者
select * from( select * from table where storeid=1 ) where createtime between '2019-01-01 00:00:00' and '2019-12-31 23:59:59'
另外你返回的数据有17万?那么得考虑数据通讯的开销。可以select必要的字段,而不是*来节约。