Database Administration (MOSC)

MOSC Banner

Performance of sql query - Oracle

in Database Administration (MOSC) 10 commentsAnswered

Hi Team,

We are on 19.28 Oracle Database version.

Please kindly suggest, if we can avoid the full table scan, column order.

SELECT MAX(VERSION_HISTORY) FROM XXTTD.XXTTD_AP_MB_LINITEM_HIST_TAB
WHERE MBOOK_BILL_HEADER_ID = :B5 AND MBOOK_BILL_HEADER_ID = :B4 AND :B4
= :B3 AND MBOOK_BILL_LINE_ID = :B2 AND :B2 = :B1

Plan hash value: 4209819504

----------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
----------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | | | 55507 (100)| |
| 1 | SORT AGGREGATE | | 1 | 14 | | |
|* 2 | FILTER | | | | | |
|* 3 | TABLE ACCESS FULL| XXTTD_AP_MB_LINITEM_HIST_TAB | 1 | 14 | 55507 (1)| 00:00:03 |
----------------------------------------------------------------------------------------------------

Predicate Information (identified by operation id):

2 - filter((:B2=:B1 AND :B4=:B3 AND :B4=TO_NUMBER(:B5)))

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

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

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center