+ -
当前位置:首页 → 问答吧 → 查询速度太慢了!高手帮我优化一下吧!急!!!!!

查询速度太慢了!高手帮我优化一下吧!急!!!!!

时间:2011-12-01

来源:互联网

SQL code
 select
        * 
    from
        (select
            a.resultid,
            a.dataid,
            a.tiptext,
            b.title,
            b.content,
            b.issuetime,
            b.url,
            rownum as rn 
        from
            r_resultnews a 
        left join
            v_chn_news b 
                on a.dataid=b.dataid 
        where
            a.classid=2378 
            and siteid in (
                select
                    siteid 
                from
                    tg_eventstatic 
                where
                    datatype=1 
                    and eventclass=2378 
                    and positionid='北京'
            ) 
            and rownum>0
        ) 
    where
        rn>0 
        and rn<=30

作者: figo977   发布时间: 2011-12-01

查询出来14条 数据 大概要2分钟吧!

作者: figo977   发布时间: 2011-12-01

请给出各个表的表结构,和查询的需求。

作者: LuiseRADL   发布时间: 2011-12-01

需求就是查询北京地区发表关于专题id号为2378的新闻数量

作者: figo977   发布时间: 2011-12-01