开发者社区> 问答> 正文

数据库查询11秒 好慢 肿么回事

SQL: SELECT Vod.vod_id AS vod_id,Vod.vod_cid AS vod_cid,Vod.vod_name AS vod_name,Vod.vod_ename AS vod_ename,Vod.vod_title AS vod_title,Vod.vod_keywords AS vod_keywords,Vod.vod_type AS vod_type,Vod.vod_color AS vod_color,Vod.vod_actor AS vod_actor,Vod.vod_director AS vod_director,Vod.vod_content AS vod_content,Vod.vod_pic AS vod_pic,Vod.vod_pic_bg AS vod_pic_bg,Vod.vod_pic_slide AS vod_pic_slide,Vod.vod_area AS vod_area,Vod.vod_language AS vod_language,Vod.vod_year AS vod_year,Vod.vod_continu AS vod_continu,Vod.vod_total AS vod_total,Vod.vod_isend AS vod_isend,Vod.vod_addtime AS vod_addtime,Vod.vod_filmtime AS vod_filmtime,Vod.vod_hits AS vod_hits,Vod.vod_hits_day AS vod_hits_day,Vod.vod_hits_week AS vod_hits_week,Vod.vod_hits_month AS vod_hits_month,Vod.vod_hits_lasttime AS vod_hits_lasttime,Vod.vod_stars AS vod_stars,Vod.vod_status AS vod_status,Vod.vod_up AS vod_up,Vod.vod_down AS vod_down,Vod.vod_ispay AS vod_ispay,Vod.vod_price AS vod_price,Vod.vod_trysee AS vod_trysee,Vod.vod_play AS vod_play,Vod.vod_server AS vod_server,Vod.vod_url AS vod_url,Vod.vod_inputer AS vod_inputer,Vod.vod_reurl AS vod_reurl,Vod.vod_jumpurl AS vod_jumpurl,Vod.vod_letter AS vod_letter,Vod.vod_skin AS vod_skin,Vod.vod_gold AS vod_gold,Vod.vod_golder AS vod_golder,Vod.vod_length AS vod_length,Vod.vod_weekday AS vod_weekday,Vod.vod_series AS vod_series,Vod.vod_copyright AS vod_copyright,Vod.vod_state AS vod_state,Vod.vod_version AS vod_version,Vod.vod_tv AS vod_tv,Vod.vod_douban_id AS vod_douban_id,Vod.vod_douban_score AS vod_douban_score,Vod.vod_scenario AS vod_scenario,Vod.vod_extend AS vod_extend,List.list_id AS list_id,List.list_name AS list_name,List.list_dir AS list_dir FROM ff_vod Vod JOIN ff_list List ON Vod.vod_cid = List.list_id WHERE ( Vod.vod_status = 1 ) AND ( Vod.vod_hits_lasttime > 1511971199 ) ORDER BY Vod.vod_hits desc LIMIT 0,5 [ RunTime:11.812951s ]

不知到怎么回事,好慢,用的阿里云 RDS数据库

展开
收起
缝合额 2017-12-06 01:08:19 2190 0
2 条回答
写回答
取消 提交回答
  • 混迹于Java圈的老年人

    如果两张表的数据都很大的情况下,建议先用( Vod.vod_status = 1 ) AND ( Vod.vod_hits_lasttime > 1511971199 ) 条件select出来一张小表,再用小表进行Join。

    2019-07-17 21:47:24
    赞同 展开评论 打赏
  • 你知道如何用c#连接云服务器windows server2012的sql server数据库

    2019-07-17 21:47:24
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
DTCC 2022大会集锦《云原生一站式数据库技术与实践》 立即下载
阿里云瑶池数据库精要2022版 立即下载
2022 DTCC-阿里云一站式数据库上云最佳实践 立即下载