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数据库
如果两张表的数据都很大的情况下,建议先用( Vod.vod_status = 1 ) AND ( Vod.vod_hits_lasttime > 1511971199 ) 条件select出来一张小表,再用小表进行Join。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。