Query Regression - Lateral View Oracle 19c (Bug for a Bug)

While upgrading database from version 12.1 to version 19.10 came across set of queries using lateral views (basically VW_LAT** shown in execution plan). Such queries was behaving slow than the response time we got on 12.1 database.

Looking further into this we found it was due to a Bug 30786641 which was introduced after the fix to another Bug 23273859. To understand the problem we need to first cover Bug  23273859.

Bug 23273859 which was introduced due to wrong result with join predicate pushed and correlated subquery using ANSI syntax. It affected all versions lesser than 12.2 and fix was introduced in database version 12.2.0.1 base releases. This bug introduced another behavior where lateral view shows performance degradation and oracle comes up another bug in the form of 30786641.

Bug 30786641 for slow performance of lateral views was fixed with version 19.10 Jan 2021 RU and in 21.1 Base release. In a case where fixed for this bug already available in your binary, it needs to be activated using

    ALTER SYSTEM SET "_fix_control" = '30786641:1' scope=both sid='*';

Once the fix activated this will apply the fix under Bug 30786641 and query performing bad would then run fine.

Comments

Popular posts from this blog

How to Solve - "WAIT FOR EMON PROCESS NTFNS"

Query Regression - "OR" Transformation Oracle 19c

ORA - 12537: TNS: connection closed