我有一個表,它是在MySQL中的相關GPS應用程序。每當我從asp.net應用程序執行它顯示胎兒錯誤。所以我決定在mysql中運行,執行SP需要1分多鐘(正好70秒)。是否有可能解決這些問題。從ASP.NET中減少MYSQL的執行時間
進一步的信息:
表1:server_gpsdata(它包含GPS數據它每10秒從鎖定GPS設備)。
select * from server_gpsdata SD
INNER JOIN mstcab MC on MC.cabid= SD.cabid
INNER JOIN server_tblstatus TS on TS.statusid= MC.CabStatusid
INNER JOIN carmaster CM on CM.carid= MC.carid
INNER JOIN cabtype CT on CT.cabtypeid= CM.sizeid
where date(SD.cur_datetime) =current_date and
MC.Cabid not in (select D.cabid from trncabdriver D
where date(D.logintime)=current_date) and
SD.gpsdataid in (select max(SGD.gpsdataid) from server_gpsdata SGD
where date(SGD.cur_datetime)=current_date
group by SGD.cabid);
我們需要查看查詢和涉及的表,可能。 –
您能否提供更多信息,例如相關代碼和安裝細節? – staaar
這將是很好的嘗試延長查詢超時,但您將不得不提供有關您的數據訪問組件的更多細節。 –