- 最后登录
- 2015-5-21
- 在线时间
- 100 小时
- 威望
- 0
- 金钱
- 345
- 注册时间
- 2012-12-19
- 阅读权限
- 10
- 帖子
- 99
- 精华
- 0
- 积分
- 0
- UID
- 824
|
1#
发表于 2013-3-18 09:42:55
|
查看: 3986 |
回复: 8
sql语句- SELECT PID,
- NO,
- 'LG', '力干',
- 'XH', '祥和',
- 'SD', '晟达',
- 'PK', '派克',
- 'JZLT', '昆明忠金立泰科技有限公司',
- 'HS', '豪胜',
- 'SH', '松浩',
- '无')
- wip_type,
- SIGN (
- NVL (COMPLETIONTIME, SYSDATE)
- - NVL (e.last_update_date, SYSDATE))
- overdue,
- b.planflag
- FROM LS_WIP_HEADERS a
- LEFT OUTER JOIN ls_wip_lines b
- ON a.pid = b.headerid
- LEFT OUTER JOIN lsv_gongdan2 c
- ON b.makeno = c.makeno AND b.fnumber = c.ordered_item
- LEFT OUTER JOIN ( SELECT DISTINCT
- header_id,
- line_id,
- prod_proc_type_id,
- MAX (last_update_date) last_update_date
- FROM LS_WIP_PROD_PROC
- GROUP BY header_id, line_id, prod_proc_type_id) e
- ON b.headerid = e.header_id
- AND b.lineid = e.line_id
- AND e.prod_proc_type_id =
- DECODE (a.inv_type, '导轨', 7, 12)
- WHERE b.state = 1 AND a.flag IN (2, 3)
复制代码 执行计划- 1 Plan hash value: 2064127176
- 2
- 3 ---------------------------------------------------------------------------------------------------------
- 4 | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
- 5 ---------------------------------------------------------------------------------------------------------
- 6 | 0 | SELECT STATEMENT | | 35811 | 212M| | 100K (1)| 00:20:02 |
- 7 |* 1 | HASH JOIN RIGHT OUTER | | 35811 | 212M| 10M| 100K (1)| 00:20:02 |
- 8 | 2 | VIEW | | 178K| 8390K| | 1341 (2)| 00:00:17 |
- 9 | 3 | HASH GROUP BY | | 178K| 3496K| 10M| 1341 (2)| 00:00:17 |
- 10 | 4 | TABLE ACCESS FULL | LS_WIP_PROD_PROC | 178K| 3496K| | 240 (3)| 00:00:03 |
- 11 | 5 | VIEW | | 35811 | 211M| | 87765 (1)| 00:17:34 |
- 12 |* 6 | HASH JOIN OUTER | | 35811 | 135M| 5216K| 87765 (1)| 00:17:34 |
- 13 |* 7 | HASH JOIN | | 35811 | 4791K| 2800K| 4638 (1)| 00:00:56 |
- 14 |* 8 | TABLE ACCESS FULL | LS_WIP_LINES | 35811 | 2378K| | 3733 (1)| 00:00:45 |
- 15 |* 9 | TABLE ACCESS FULL | LS_WIP_HEADERS | 62753 | 4228K| | 525 (2)| 00:00:07 |
- 16 | 10 | VIEW | LSV_GONGDAN2 | 319K| 1167M| | 24777 (1)| 00:04:58 |
- 17 | 11 | HASH GROUP BY | | 319K| 37M| 81M| 24777 (1)| 00:04:58 |
- 18 |* 12 | HASH JOIN RIGHT OUTER | | 319K| 37M| 5944K| 15881 (1)| 00:03:11 |
- 19 | 13 | TABLE ACCESS FULL | LS_MATERIEL_ITEM | 121K| 4511K| | 1254 (1)| 00:00:16 |
- 20 |* 14 | HASH JOIN OUTER | | 319K| 26M| 17M| 12851 (1)| 00:02:35 |
- 21 |* 15 | HASH JOIN RIGHT OUTER| | 319K| 13M| 9224K| 4764 (1)| 00:00:58 |
- 22 | 16 | TABLE ACCESS FULL | LS_ORDER_HEADERS | 248K| 6309K| | 2635 (1)| 00:00:32 |
- 23 | 17 | TABLE ACCESS FULL | LS_ORDER_LISTS | 319K| 6231K| | 1188 (1)| 00:00:15 |
- 24 | 18 | TABLE ACCESS FULL | LS_ORDER_LINES | 596K| 22M| | 5727 (1)| 00:01:09 |
- 25 ---------------------------------------------------------------------------------------------------------
- 26
- 27 Predicate Information (identified by operation id):
- 28 ---------------------------------------------------
- 29
- 30 1 - access("E"."PROD_PROC_TYPE_ID"(+)=DECODE("A"."INV_TYPE",'导轨',7,12) AND
- 31 "B"."LINEID"="E"."LINE_ID"(+) AND "B"."HEADERID"="E"."HEADER_ID"(+))
- 32 6 - access("B"."FNUMBER"="C"."ORDERED_ITEM"(+) AND "B"."MAKENO"="C"."MAKENO"(+))
- 33 7 - access("A"."PID"="B"."HEADERID")
- 34 8 - filter("B"."STATE"=1)
- 35 9 - filter("A"."FLAG"=2 OR "A"."FLAG"=3)
- 36 12 - access("LINE"."ORDERED_ITEM"="ITEM"."FNUMBER"(+))
- 37 14 - access("LIST"."LINE_ID"="LINE"."LINE_ID"(+) AND "LIST"."HEAD_ID"="LINE"."HEADER_ID"(+))
- 38 15 - access("LIST"."HEAD_ID"="HEAD"."HEADER_ID"(+))
复制代码 我的问题是,为什么2,5,11view那一行的bytes会比下一行多那么多(10g,olap数据库) |
|