SQL> SELECT
2 DATA_DATE,
3 MGR_CODE,
4 IDX_CODE,
5 IDX_NAME,
6 CUR_NAME,
7 sum(decode(data_date, 20130101, ACCT_BAL, 0)) as ACCT_BAL,
8 sum(decode(data_date, 20130101, D_CMP_BAL, 0)) as D_CMP_BAL,
9 sum(decode(data_date, 20130101, M_CMP_BAL, 0)) as M_CMP_BAL,
10 sum(decode(data_date, 20130101, Q_CMP_BAL, 0)) as Q_CMP_BAL,
11 sum(decode(data_date, 20130101, Y_CMP_BAL, 0)) as Y_CMP_BAL,
12 sum(decode(data_date, 20130101, Y_AVG_BAL, 0)) as Y_AVG_BAL,
13 sum(decode(data_date, 20130101, SIM_PROFIT, 0)) as SIM_PROFIT,
14 UNIT1_CODE,
15 UNIT2_CODE,
16 UNIT3_CODE,
17 UNIT4_CODE,
18 UNIT5_CODE,
19 DEPT1_CODE,
20 CUR_CODE,
21 case when substr(idx_code,1,1) IN ( '5' , '6' ) then
22 sum(decode(data_date, 20130101, ACCT_BAL, 0))
23 else
24 (sum(decode(data_date, 20121231, ACCU_BAL, 0)) -
25 sum(decode(data_date, 20121231, ACCU_BAL, 0)) +
26 sum(decode(data_date, 20130101, ACCT_BAL, 0)))
27 end
28 as ACCU_BAL
29 from T_PM_MGR_BASE T1
30 WHERE T1.DATA_DATE in (20130101, 20121231, 20121231)
31 -- AND T1.CUR_CODE <> 5 --modified 2011-02-11
32 and t1.cur_code not in (2,3,4,5)
33 group by DATA_DATE,
34 MGR_CODE,
35 IDX_CODE,
36 IDX_NAME,
37 CUR_NAME,
38 UNIT1_CODE,
39 UNIT2_CODE,
40 UNIT3_CODE,
41 UNIT4_CODE,
42 UNIT5_CODE,
43 DEPT1_CODE,
44 CUR_CODE;
SELECT
*
ERROR at line 1:
ORA-03113: end-of-file on communication channel
Process ID: 14915
Session ID: 1781 Serial number: 24749
Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x20] [PC:0x1A396BE, qkxrPXformUnm()+46] [flags: 0x0, count: 1]
DDE: Problem Key 'ORA 7445 [qkxrPXformUnm()+46]' was flood controlled (0x2) (incident: 156631)
ORA-07445: exception encountered: core dump [qkxrPXformUnm()+46] [SIGSEGV] [ADDR:0x20] [PC:0x1A396BE] [Address not mapped to object] []
ssexhd: crashing the process...
Shadow_Core_Dump = PARTIAL
ksdbgcra: writing core file to directory '/oracle/app/diag/rdbms/perass/perass/cdump'
~
~
SQL_ID a3v1jjpwdqf5u, child number 0
-------------------------------------
INSERT /*+append*/ INTO TMP1_T_PM_MGR_BASE NOLOGGING (DATA_DATE,
MGR_CODE, IDX_CODE, IDX_NAME, CUR_NAME, ACCT_BAL, Y_AVG_BAL,
UNIT1_CODE, UNIT2_CODE, UNIT3_CODE, UNIT4_CODE, UNIT5_CODE, DEPT1_CODE,
CUR_CODE, ACCU_BAL) SELECT /*+use_merge(t1 t2) parallel(t1 16)*/
DATA_DATE, T1.MGR_CODE, IDX_CODE, IDX_NAME, CUR_NAME, SUM(ACCT_BAL),
SUM(Y_AVG_BAL), T2.UNIT1_CODE, T2.UNIT2_CODE, T2.UNIT3_CODE,
T2.UNIT4_CODE, T2.UNIT5_CODE, T2.DEPT1_CODE, CUR_CODE, SUM(ACCU_BAL)
FROM (SELECT /*+parallel(a 16)*/ A.* FROM T_PM_MGR_BASE A WHERE
A.DATA_DATE IN (:B3 ,:B2 ,:B1 ) AND A.CUR_CODE NOT IN (2, 3, 4, 5) )
T1, S_PM_MGR_DEPT_RELA T2 WHERE T1.MGR_CODE = T2.MGR_CODE AND
T1.UNIT3_CODE = T2.UNIT3_CODE AND T2.DEPT1_CODE<>'999999999' GROUP BY
DATA_DATE, T1.MGR_CODE, IDX_CODE, IDX_NAME, CUR_NAME, T2.UNIT1_CODE,
T2.UNIT2_CODE, T2.UNIT3_CODE, T2.UNIT4_CODE, T2.UNIT5_CODE,
T2.DEPT1_CODE, CUR_CODE UNION ALL SELECT /*+use_merge(t1 t2)
parallel(t1 16)*/ DATA_DATE, T1.MGR_CODE, IDX_CODE, IDX_NAME, CUR_NAME,
SUM(ACCT_BA
Plan hash value: 1836272322
------------------------------------------------------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop | TQ |IN-OUT| PQ Distrib |
------------------------------------------------------------------------------------------------------------------------------------------------------
| 0 | INSERT STATEMENT | | | | 752 (100)| | | | | | |
| 1 | LOAD AS SELECT | | | | | | | | | | |
| 2 | UNION-ALL | | | | | | | | | | |
| 3 | PX COORDINATOR | | | | | | | | | | |
| 4 | PX SEND QC (RANDOM) | :TQ10002 | 1 | 124 | 376 (2)| 00:00:05 | | | Q1,02 | P->S | QC (RAND) |
| 5 | HASH GROUP BY | | 1 | 124 | 376 (2)| 00:00:05 | | | Q1,02 | PCWP | |
| 6 | MERGE JOIN | | 1 | 124 | 376 (2)| 00:00:05 | | | Q1,02 | PCWP | |
| 7 | SORT JOIN | | 1 | 74 | 348 (1)| 00:00:05 | | | Q1,02 | PCWP | |
| 8 | PX RECEIVE | | 1 | 74 | 347 (1)| 00:00:05 | | | Q1,02 | PCWP | |
| 9 | PX SEND HASH | :TQ10001 | 1 | 74 | 347 (1)| 00:00:05 | | | Q1,01 | P->P | HASH |
| 10 | PX BLOCK ITERATOR | | 1 | 74 | 347 (1)| 00:00:05 |KEY(I) |KEY(I) | Q1,01 | PCWC | |
|* 11 | TABLE ACCESS FULL | T_PM_MGR_BASE | 1 | 74 | 347 (1)| 00:00:05 |KEY(I) |KEY(I) | Q1,01 | PCWP | |
|* 12 | SORT JOIN | | 6746 | 329K| 28 (4)| 00:00:01 | | | Q1,02 | PCWP | |
| 13 | BUFFER SORT | | | | | | | | Q1,02 | PCWC | |
| 14 | PX RECEIVE | | 6746 | 329K| 27 (0)| 00:00:01 | | | Q1,02 | PCWP | |
| 15 | PX SEND HASH | :TQ10000 | 6746 | 329K| 27 (0)| 00:00:01 | | | | S->P | HASH |
|* 16 | INDEX FAST FULL SCAN | MGR_DEPT_RELA_IDX1 | 6746 | 329K| 27 (0)| 00:00:01 | | | | | |
| 17 | PX COORDINATOR | | | | | | | | | | |
| 18 | PX SEND QC (RANDOM) | :TQ20003 | 1 | 133 | 376 (2)| 00:00:05 | | | Q2,03 | P->S | QC (RAND) |
| 19 | HASH GROUP BY | | 1 | 133 | 376 (2)| 00:00:05 | | | Q2,03 | PCWP | |
| 20 | PX RECEIVE | | 1 | 133 | 376 (2)| 00:00:05 | | | Q2,03 | PCWP | |
| 21 | PX SEND HASH | :TQ20002 | 1 | 133 | 376 (2)| 00:00:05 | | | Q2,02 | P->P | HASH |
| 22 | HASH GROUP BY | | 1 | 133 | 376 (2)| 00:00:05 | | | Q2,02 | PCWP | |
| 23 | MERGE JOIN | | 1 | 133 | 376 (2)| 00:00:05 | | | Q2,02 | PCWP | |
| 24 | SORT JOIN | | 1 | 110 | 348 (1)| 00:00:05 | | | Q2,02 | PCWP | |
| 25 | PX RECEIVE | | 1 | 110 | 347 (1)| 00:00:05 | | | Q2,02 | PCWP | |
| 26 | PX SEND HASH | :TQ20001 | 1 | 110 | 347 (1)| 00:00:05 | | | Q2,01 | P->P | HASH |
| 27 | PX BLOCK ITERATOR | | 1 | 110 | 347 (1)| 00:00:05 |KEY(I) |KEY(I) | Q2,01 | PCWC | |
|* 28 | TABLE ACCESS FULL | T_PM_MGR_BASE | 1 | 110 | 347 (1)| 00:00:05 |KEY(I) |KEY(I) | Q2,01 | PCWP | |
|* 29 | FILTER | | | | | | | | Q2,02 | PCWP | |
|* 30 | SORT JOIN | | 6746 | 151K| 28 (4)| 00:00:01 | | | Q2,02 | PCWP | |
| 31 | BUFFER SORT | | | | | | | | Q2,02 | PCWC | |
| 32 | PX RECEIVE | | 6746 | 151K| 27 (0)| 00:00:01 | | | Q2,02 | PCWP | |
| 33 | PX SEND HASH | :TQ20000 | 6746 | 151K| 27 (0)| 00:00:01 | | | | S->P | HASH |
|* 34 | INDEX FAST FULL SCAN| MGR_DEPT_RELA_IDX1 | 6746 | 151K| 27 (0)| 00:00:01 | | | | | |
------------------------------------------------------------------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
11 - access(:Z>=:Z AND :Z<=:Z)
filter((TO_NUMBER("A"."CUR_CODE")<>5 AND TO_NUMBER("A"."CUR_CODE")<>2 AND TO_NUMBER("A"."CUR_CODE")<>4 AND
TO_NUMBER("A"."CUR_CODE")<>3))
12 - access("A"."MGR_CODE"="T2"."MGR_CODE" AND "A"."UNIT3_CODE"="T2"."UNIT3_CODE")
filter(("A"."UNIT3_CODE"="T2"."UNIT3_CODE" AND "A"."MGR_CODE"="T2"."MGR_CODE"))
16 - filter("T2"."DEPT1_CODE"<>'999999999')
28 - access(:Z>=:Z AND :Z<=:Z)
filter((TO_NUMBER("A"."CUR_CODE")<>5 AND TO_NUMBER("A"."CUR_CODE")<>2 AND TO_NUMBER("A"."CUR_CODE")<>4 AND
TO_NUMBER("A"."CUR_CODE")<>3))
29 - filter("A"."UNIT3_CODE"<>"T2"."UNIT3_CODE")
30 - access("A"."MGR_CODE"="T2"."MGR_CODE")
filter("A"."MGR_CODE"="T2"."MGR_CODE")
34 - filter("T2"."DEPT1_CODE"<>'999999999')
Note
-----
- dynamic sampling used for this statement (level=7)
SQL> show parameter opti
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
filesystemio_options string none
object_cache_optimal_size integer 102400
optimizer_capture_sql_plan_baselines boolean FALSE
optimizer_dynamic_sampling integer 2
optimizer_features_enable string 11.2.0.3
optimizer_index_caching integer 0
optimizer_index_cost_adj integer 100
optimizer_mode string ALL_ROWS
optimizer_secure_view_merging boolean TRUE
optimizer_use_invisible_indexes boolean FALSE
optimizer_use_pending_statistics boolean FALSE
修改优化器版本为optimizer_features_enable='10.2.0.4'