My Oracle Support Banner

Bad Execution Plan With OR Query After Update To 12.2.0.1 (Doc ID 2536570.1)

Last updated on APRIL 17, 2023

Applies to:

Oracle Database - Enterprise Edition - Version 12.2.0.1 and later
Information in this document applies to any platform.

Symptoms

 Bad execution plan with OR query after update to 12.2.0.1

--------------
12.1 Good plan
--------------

PLAN_TABLE_OUTPUT                                                                                                                                                                                                                                         
-------------------------------------------------------------------------------------------------
Plan hash value: 2058549413                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                          
-----------------------------------------------------------------------------------------                                                                                                                                                                 
| Id  | Operation                      | Name   | Rows  | Bytes | Cost (%CPU)| Time     |                                                                                                                                                                 
-----------------------------------------------------------------------------------------                                                                                                                                                                 
|   0 | SELECT STATEMENT               |        |     1 |  3124 |     2   (0)| 00:00:01 |                                                                                                                                                                 
|*  1 |  VIEW                          |        |     1 |  3124 |     2   (0)| 00:00:01 |                                                                                                                                                                 
|*  2 |   WINDOW NOSORT STOPKEY        |        |     2 |  1146 |     2   (0)| 00:00:01 |                                                                                                                                                                 
|   3 |    CONCATENATION               |        |       |       |            |          |                                                                                                                                                                 
|   4 |     TABLE ACCESS BY INDEX ROWID| XXX   |     1 |   573 |     1   (0)| 00:00:01 |                                                                                                                                                                 
|*  5 |      INDEX UNIQUE SCAN         | VEKP~0 |     1 |       |     0   (0)| 00:00:01 |                                                                                                                                                                 
|*  6 |     TABLE ACCESS BY INDEX ROWID| XXXX   |     1 |   573 |     1   (0)| 00:00:01 |                                                                                                                                                                 
|*  7 |      INDEX RANGE SCAN          | XXXX~C |     1 |       |     1   (0)| 00:00:01 |                                                                                                                                                                 
-----------------------------------------------------------------------------------------

 

---------
12.2 Bad plan:
---------

PLAN_TABLE_OUTPUT                                                                                                                                                                                                                                         
--------------------------------------------------------------------------------------------------------
Plan hash value: 847763653                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                          
------------------------------------------------------------------------------------------                                                                                                                                                                
| Id  | Operation                     | Name     | Rows  | Bytes | Cost (%CPU)| Time     |                                                                                                                                                                
------------------------------------------------------------------------------------------                                                                                                                                                                
|   0 | SELECT STATEMENT              |          |     1 |  3124 |   510K  (1)| 00:00:20 |                                                                                                                                                                
|*  1 |  VIEW                         |          |     1 |  3124 |   510K  (1)| 00:00:20 |                                                                                                                                                                
|*  2 |   WINDOW NOSORT STOPKEY       |          |     2 |  1146 |   510K  (1)| 00:00:20 |                                                                                                                                                                
|*  3 |    TABLE ACCESS BY INDEX ROWID| VEKP     |     2 |  1146 |   510K  (1)| 00:00:20 |                                                                                                                                                                
|*  4 |     INDEX RANGE SCAN          | VEKP~Z05 |    31M|       | 15210   (1)| 00:00:01 |                                                                                                                                                                
------------------------------------------------------------------------------------------

 

 

Changes

 Database upgraded to 12.2

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.