生产环境中遭遇temp空间不足的报错
定位产生异常的语句如下:
select *
from (select t.*, rownum rn
from (select p.video_id, c.path, c.hosts, t.sha1
from converttype c
left join tasks t
on t.id = c.taskid
left join ugc_upload_progress p
on p.video_id = t.videoid
where p.convert_status = 1
and p.convert_success_date >sysdate - 1
and c.type = 0) t
where rownum < 10)
where rn >= 0
手动执行起来没有等到结束时间,时间过长。
查看执行计划如下:
SELECT STATEMENT, GOAL = ALL_ROWS 1066 1 1332
VIEW PPS_UGC 1066 1 1332
COUNT STOPKEY
HASH JOIN 1066 1 241
MERGE JOIN CARTESIAN 722 9364 1498240
TABLE ACCESS
sql调优之执行计划之笛卡尔连接————MERGE JOIN CARTESIAN
最新推荐文章于 2022-10-23 11:26:22 发布