- 最后登录
- 2013-10-23
- 在线时间
- 5 小时
- 威望
- 92
- 金钱
- 1301
- 注册时间
- 2012-7-6
- 阅读权限
- 50
- 帖子
- 16
- 精华
- 1
- 积分
- 92
- UID
- 575
|
15#
发表于 2012-7-25 16:31:08
用hint merge连接方式
SQL> select /*+use_merge(a1,a2,a3,a4,a5,a6)*/distinct a1.target_file_name,
2 a1.content_name,
3 round(a6.duration),
4 a5.meta_data_type,
5 a3.name,
6 round((a1.begin_time - a1.create_time) * 24 * 3600),
7 round((a1.end_time - a1.begin_time) * 24 * 3600),
8 round(a2.file_size / 1024 / 1024),
9 a1.create_time,
10 a1.begin_time,
11 a1.end_time
12 from cms_icms.cip_ac_encoder_task a1,
13 cms_icms.cip_ac_fs_file a2,
14 cms_icms.cip_video_encoding a3,
15 cms_icms.cip_ac_delivery_mission_his a4,
16 cms_icms.t_base_content a5,
17 cms_icms.t_video_item a6
18 where a1.target_file_name = a2.file_name
19 and a2.file_size > 0
20 and a3.code = a1.codec
21 and a1.content_name = a4.asset_name
22 and a6.id = a4.content_id
23 and a1.content_name = a5.assetname
24 and a1.create_time > '24-7ÔÂ-2012'
25 and a1.end_time < '25-7ÔÂ-2012'
26 and a1.begin_time is not null
27 ;
select /*+use_merge(a1,a2,a3,a4,a5,a6)*/distinct a1.target_file_name,
a1.content_name,
round(a6.duration),
a5.meta_data_type,
a3.name,
round((a1.begin_time - a1.create_time) * 24 * 3600),
round((a1.end_time - a1.begin_time) * 24 * 3600),
round(a2.file_size / 1024 / 1024),
a1.create_time,
a1.begin_time,
a1.end_time
from cms_icms.cip_ac_encoder_task a1,
cms_icms.cip_ac_fs_file a2,
cms_icms.cip_video_encoding a3,
cms_icms.cip_ac_delivery_mission_his a4,
cms_icms.t_base_content a5,
cms_icms.t_video_item a6
where a1.target_file_name = a2.file_name
and a2.file_size > 0
and a3.code = a1.codec
and a1.content_name = a4.asset_name
and a6.id = a4.content_id
and a1.content_name = a5.assetname
and a1.create_time > '24-7ÔÂ-2012'
and a1.end_time < '25-7ÔÂ-2012'
and a1.begin_time is not null
ORA-04030: ÔÚ³¢ÊÔ·ÖÅä 2097184 ×Ö½Ú (QERHJ hash-joi,QERHJ Bit vector) ʱ½ø³ÌÄÚ´æ²»×ã
SQL> |
|