- 最后登录
- 2015-9-23
- 在线时间
- 165 小时
- 威望
- 0
- 金钱
- 57
- 注册时间
- 2013-7-26
- 阅读权限
- 10
- 帖子
- 52
- 精华
- 0
- 积分
- 0
- UID
- 1172
|
1#
发表于 2013-9-3 17:39:21
|
查看: 4107 |
回复: 6
本帖最后由 clot09 于 2013-9-3 17:39 编辑
linux Release: 2.6.32.17
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
PL/SQL Release 10.2.0.5.0 - Production
CORE 10.2.0.5.0 Production
TNS for Linux: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production- SQL> set autot traceonly
- SQL> select d.id, d.publish_object_id, to_char(phc.assetid)
- 2 from content_iptv_physicalchannel phc,
- 3 content_iptv_schedule sc,
- 4 vod_cms_publish_seq_detail_bak d
- 5 where exists (SELECT 1 FROM content_base cb where cb.activeid=phc.id and cb.assetid = phc.assetid)
- 6 and phc.channelassetid = sc.channelassetid
- 7 and phc.assetstatus =3
- 8 and sc.id = d.publish_object_id
- 9 and d.data_type = 30
- 10 and d.delete_asset_type = 40
- 11 and d.parent_id = 126187112
- 12 order by d.publish_object_id;
- 910710 rows selected.
- Execution Plan
- ----------------------------------------------------------
- Plan hash value: 1777070399
- ------------------------------------------------------------------------------------------------------------------
- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
- ------------------------------------------------------------------------------------------------------------------
- | 0 | SELECT STATEMENT | | 1 | 71 | 28 (4)| 00:00:01 |
- | 1 | SORT ORDER BY | | 1 | 71 | 28 (4)| 00:00:01 |
- | 2 | NESTED LOOPS SEMI | | 1 | 71 | 27 (0)| 00:00:01 |
- | 3 | NESTED LOOPS | | 4 | 236 | 26 (0)| 00:00:01 |
- | 4 | NESTED LOOPS | | 1 | 40 | 2 (0)| 00:00:01 |
- |* 5 | TABLE ACCESS BY INDEX ROWID| VOD_CMS_PUBLISH_SEQ_DETAIL_BAK | 1 | 28 | 1 (0)| 00:00:01 |
- |* 6 | INDEX RANGE SCAN | SEQ_DETAILB_PARENTDATATYPE_IDX | 1 | | 1 (0)| 00:00:01 |
- | 7 | TABLE ACCESS BY INDEX ROWID| CONTENT_IPTV_SCHEDULE | 1 | 12 | 1 (0)| 00:00:01 |
- |* 8 | INDEX UNIQUE SCAN | PK_CONTENT_IPTV_SCHEDULE | 1 | | 1 (0)| 00:00:01 |
- | 9 | TABLE ACCESS BY INDEX ROWID | CONTENT_IPTV_PHYSICALCHANNEL | 300 | 5700 | 24 (0)| 00:00:01 |
- |* 10 | INDEX RANGE SCAN | IDX_PHYSICALCHANNEL_NEW | 300 | | 1 (0)| 00:00:01 |
- |* 11 | INDEX RANGE SCAN | IDX_CONTENT_BASE_ASSETACTIVEID | 1 | 12 | 1 (0)| 00:00:01 |
- ------------------------------------------------------------------------------------------------------------------
- Predicate Information (identified by operation id):
- ---------------------------------------------------
- 5 - filter("D"."DELETE_ASSET_TYPE"=40)
- 6 - access("D"."PARENT_ID"=126187112 AND "D"."DATA_TYPE"=30)
- 8 - access("SC"."ID"="D"."PUBLISH_OBJECT_ID")
- 10 - access("PHC"."CHANNELASSETID"="SC"."CHANNELASSETID" AND "PHC"."ASSETSTATUS"=3)
- 11 - access("CB"."ASSETID"="PHC"."ASSETID" AND "CB"."ACTIVEID"="PHC"."ID")
- Statistics
- ----------------------------------------------------------
- 0 recursive calls
- 0 db block gets
- 146210796 consistent gets
- 89 physical reads
- 0 redo size
- 30733018 bytes sent via SQL*Net to client
- 668335 bytes received via SQL*Net from client
- 60715 SQL*Net roundtrips to/from client
- 1 sorts (memory)
- 0 sorts (disk)
- 910710 rows processed
复制代码 content_iptv_physicalchannel ---90073行
content_base ---1429183行
content_iptv_schedule-- 188095
vod_cms_publish_seq_detail_bak --- 2035297
表的ddl在附件中
---做了个level 1 的10046
(后来做的,consistent gets稍微有点区别)
PARSE #3:c=0,e=62,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=1345890593930718
EXEC #3:c=0,e=304,p=0,cr=0,cu=0,mis=0,r=1,dep=0,og=1,tim=1345890593931209
STAT #2 id=1 cnt=910710 pid=0 pos=1 obj=0 op='SORT ORDER BY (cr=1,4621,0797 pr=29 pw=0 time=621015820 us)'
STAT #2 id=2 cnt=910710 pid=1 pos=1 obj=0 op='NESTED LOOPS SEMI (cr=1,4621,0797 pr=29 pw=0 time=767827195 us)'
STAT #2 id=3 cnt=68213663 pid=2 pos=1 obj=0 op='NESTED LOOPS (cr=1070,6085 pr=29 pw=0 time=204695611 us)'
STAT #2 id=4 cnt=71339 pid=3 pos=1 obj=0 op='NESTED LOOPS (cr=14,7580 pr=29 pw=0 time=1766561 us)'
STAT #2 id=5 cnt=71339 pid=4 pos=1 obj=988075 op='TABLE ACCESS BY INDEX ROWID VOD_CMS_PUBLISH_SEQ_DETAIL_BAK (cr=4900 pr=29 pw=0 time=553727 us)'
STAT #2 id=6 cnt=534198 pid=5 pos=1 obj=988078 op='INDEX RANGE SCAN SEQ_DETAILB_PARENTDATATYPE_IDX (cr=1409 pr=29 pw=0 time=168 us)'
STAT #2 id=7 cnt=71339 pid=4 pos=2 obj=986390 op='TABLE ACCESS BY INDEX ROWID CONTENT_IPTV_SCHEDULE (cr=14,2680 pr=0 pw=0 time=1232653 us)'
STAT #2 id=8 cnt=71339 pid=7 pos=1 obj=986391 op='INDEX UNIQUE SCAN PK_CONTENT_IPTV_SCHEDULE (cr=7,1341 pr=0 pw=0 time=625421 us)'
STAT #2 id=9 cnt=68213663 pid=3 pos=2 obj=986374 op='TABLE ACCESS BY INDEX ROWID CONTENT_IPTV_PHYSICALCHANNEL (cr=1055,8505 pr=0 pw=0 time=205925057 us)'
STAT #2 id=10 cnt=68213663 pid=9 pos=1 obj=986378 op='INDEX RANGE SCAN IDX_PHYSICALCHANNEL_NEW (cr=26,1148 pr=0 pw=0 time=804810 us)'
STAT #2 id=11 cnt=889822 pid=2 pos=2 obj=986334 op='INDEX RANGE SCAN IDX_CONTENT_BASE_ASSETACTIVEID (cr=1,3550,4712 pr=0 pw=0 time=382974329 us)'
|
|