Wrong Results While Selecting Data From A Table In Oracle 12.1.0.2.0 Connected With LAG Function (Doc ID 2254396.1)

Last updated on APRIL 25, 2017

Applies to:

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

Symptoms

Select statement produces wrong results when executed in parallel.

WBBRV_BBRVS_DWH_ID_V WBBRV_BBRVS_DWH_ID_V_N WBBRV_BBRVS_DWH_ID_A
-------------------- ---------------------- --------------------
  -1 -1 1060811466
  1060811467
  1060811468
  1060811469
  1060811470
  1060811471

Issue does not happen when parallel query is disabled.

The execution plan is:

| Id | Operation | Name |
----------------------------------------------
| 0 | SELECT STATEMENT | |
| 1 | SEQUENCE | SEQ_BBRVS |
| 2 | PX COORDINATOR | |
| 3 | PX SEND QC (RANDOM) | :TQ10001 |
| 4 | WINDOW SORT | |-------------------------------------Problematic one
| 5 | PX RECEIVE | |
| 6 | PX SEND HASH | :TQ10000 |
| 7 | PX BLOCK ITERATOR | |
| 8 | TABLE ACCESS FULL| MYSRC |
----------------------------------------------

 

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms