С хинтом /*+ optimizer_features_enable('11.2.0.4') */ запрос работает, но план неверный (так же как и в 11.2.x.x.x)mskmel wrote:OP попробуй
Code: Select all
--------------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 8 | 20640 | 32 (0)| 00:00:01 |
| 1 | VIEW | | 8 | 20640 | 32 (0)| 00:00:01 |
| 2 | UNPIVOT | | | | | |
| 3 | NESTED LOOPS OUTER | | 1 | 245 | 4 (0)| 00:00:01 |
| 4 | NESTED LOOPS | | 1 | 230 | 4 (0)| 00:00:01 |
|* 5 | TABLE ACCESS BY INDEX ROWID| FORM_BLDR_SETUP_CONFIG | 1 | 13 | 2 (0)| 00:00:01 |
|* 6 | INDEX RANGE SCAN | FK_FSC_PTL | 1 | | 1 (0)| 00:00:01 |
|* 7 | TABLE ACCESS BY INDEX ROWID| FORM_BLDR_HDR_CONFIG | 1 | 217 | 2 (0)| 00:00:01 |
|* 8 | INDEX RANGE SCAN | FK_FFH_FSC | 1 | | 1 (0)| 00:00:01 |
| 9 | TABLE ACCESS BY INDEX ROWID | FORM_BLDR_FORM_SUB_TYPE | 1 | 15 | 0 (0)| 00:00:01 |
|* 10 | INDEX UNIQUE SCAN | PK_FORM_BLDR_FORM_SUB_TYPE | 1 | | 0 (0)| 00:00:01 |
--------------------------------------------------------------------------------------------------------------
Code: Select all
-------------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes |Cost (%CPU)| Time |
-------------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 8 | 20640 | 28 (0)| 00:00:01 |
| 1 | TEMP TABLE TRANSFORMATION | | | | | |
| 2 | LOAD AS SELECT | SYS_TEMP_0FD9D69DD | | | | |
| 3 | SORT GROUP BY | | 1 | 87 | | |
| 4 | NESTED LOOPS | | 1 | 87 | 5 (0)| 00:00:01 |
| 5 | NESTED LOOPS | | 1 | 70 | 5 (0)| 00:00:01 |
| 6 | NESTED LOOPS | | 1 | 40 | 4 (0)| 00:00:01 |
|* 7 | TABLE ACCESS BY INDEX ROWID| VISIT_SCHEDULE_TASK | 1 | 17 | 2 (0)| 00:00:01 |
|* 8 | INDEX RANGE SCAN | FK_VST__FFH | 1 | | 1 (0)| 00:00:01 |
|* 9 | TABLE ACCESS BY INDEX ROWID| VISIT_SCHEDULE_ITEM_TASK | 1 | 23 | 2 (0)| 00:00:01 |
|* 10 | INDEX RANGE SCAN | FK_VTK__VST | 1 | | 1 (0)| 00:00:01 |
|* 11 | TABLE ACCESS BY INDEX ROWID | VISIT_SCHEDULE_ITEM | 1 | 30 | 1 (0)| 00:00:01 |
|* 12 | INDEX UNIQUE SCAN | PK_VISIT_SCHEDULE_ITEM | 1 | | 0 (0)| 00:00:01 |
|* 13 | INDEX RANGE SCAN | AK_VISIT_SCHEDULE | 1 | 17 | 0 (0)| 00:00:01 |
| 14 | NESTED LOOPS OUTER | | 1 | 253 | 4 (0)| 00:00:01 |
| 15 | NESTED LOOPS | | 1 | 238 | 4 (0)| 00:00:01 |
|* 16 | TABLE ACCESS BY INDEX ROWID | FORM_BLDR_SETUP_CONFIG | 1 | 13 | 2 (0)| 00:00:01 |
|* 17 | INDEX RANGE SCAN | FK_FSC_PTL | 1 | | 1 (0)| 00:00:01 |
|* 18 | TABLE ACCESS BY INDEX ROWID | FORM_BLDR_HDR_CONFIG | 1 | 225 | 2 (0)| 00:00:01 |
|* 19 | INDEX RANGE SCAN | FK_FFH_FSC | 1 | | 1 (0)| 00:00:01 |
| 20 | TABLE ACCESS BY INDEX ROWID | FORM_BLDR_FORM_SUB_TYPE | 1 | 15 | 0 (0)| 00:00:01 |
|* 21 | INDEX UNIQUE SCAN | PK_FORM_BLDR_FORM_SUB_TYPE| 1 | | 0 (0)| 00:00:01 |
| 22 | VIEW | | 8 | 20640 | 24 (0)| 00:00:01 |
| 23 | UNPIVOT | | | | | |
| 24 | VIEW | | 1 | 7678 | 3 (0)| 00:00:01 |
| 25 | TABLE ACCESS FULL | SYS_TEMP_0FD9D69DD | 1 | 253 | 3 (0)| 00:00:01 |
--------------------------------------------------------------------------------------------------------------