SQL代码需要5秒钟来查询总答案,即数据库中的大约50000行。
如何更快地进行SQL查询?
我在想如果有超过6,7或8个表,它必须浪费大量时间来查询所有数据。 有更快的方法吗?
select c.publishdate,
a.id,
a.title,
o.name,
a.author,
a.createusername,
a.createdate,
a.pubusername,
a.pubdate,
b.orgid,
c.text,
d.channelid
from cms_ext_news a
left join t_sys_user b on a.createuserid = b.id
left join cms_core_content c on a.id = c.id
left join t_sys_org o on o.orgid = b.orgid
left join cms_channel d on d.channelid = '79de9baff5f94369b709d8a1ea1e9e'