select ot.otid,ob.objname,ot.parenttype,ot.systypeid,ob.oid,ob.systemid,ot.list,ot.logictype from objecttype ot,objects ob where ot.list='0' and ot.otid=ob.otid and ob.systemid in(select systemid from systypegroup sg, systemtype st ,systems ss where st.systypegrpid=sg.systypegrpid and sg.systypegrpid='2' and ss.systypeid=st.systypeid) order by ot.otid
用这种方法查询数据内容.感觉比较慢.想问下,有没有好的方法优化一下?
用这种方法查询数据内容.感觉比较慢.想问下,有没有好的方法优化一下?
from objecttype ot
join objects ob on ot.otid=ob.otid
join (select systemid from systypegroup sg, systemtype st ,systems ss where st.systypegrpid=sg.systypegrpid and sg.systypegrpid='2' and ss.systypeid=st.systypeid) cs on ob.systemid=cs.systemid
where ot.list='0'
order by ot.otid