求助,帮忙做下这个sql语句的优化

[size=large][color=red][b]现在这个sql查询要7秒!
太慢了,求优化....[/b][/color][/size]
SELECT 
(SELECT c1.name from weather_phenomenons c1 where c1.code=a.one_code) one_name,
(SELECT c2.name from weather_phenomenons c2 where c2.code=a.two_code) two_name,
(SELECT c1.image from weather_phenomenons c1 where c1.code=a.one_code) image,
(SELECT c2.image from weather_phenomenons c2 where c2.code=a.two_code) image1,
(SELECT t.info_title from infos t where t.info_type=106 and info_status=3 order by info_time desc limit 1)title,
a.low_temperature,a.high_temperature,a.weather_day,
c.sname,c.t,c.pr1,c.wd,c.ws,c.wet
FROM weathers a,cities b,sc_realtime_weathers c
where a.area_key=b.city_key and c.sid=b.code AND a.weather_day between'2012-02-16' and '2012-02-19' and c.st='2012-02-16 18:00:00'and (c.sname like'绵阳%' or b.code='绵阳' or b.phoneticize='绵阳')
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值