none
根据执行计划提高sql语句速度 RRS feed

  • 问题

  • 这个sql语句如何优化?

     select G.RECTIME,G.LATITUDE,G.LONGITUDE from GPSRECORD G WITH(NOLOCK),IMEIRECORD I where  OccurTime between '2020-06-01 00:00:00' and '2020-07-13 15:32:00' and GPSSTATE = 'a' 
     
       and OccurTime between BDT and isnull(EDT,'2199-12-31')  and  LATITUDE <> '0' and I.ACCOUNTNO = 128351 
       and G.IMEI = I.IMEI
     and (dbo.fn_xToDec(SUBSTRING(STATUS,3,6), 'Hex')& 262144 > 0 and (speed <> '0.00')  ) order by RECTIME

    2020年7月13日 8:10

答案

全部回复