without understanding the way more than I want to know about your data model, and itβs very difficult for you to give concrete positive recommendations. But here are some notes about your indexing strategy and why I assume that the optimizer does not use the indexes you have.
In the subquery, the access path to REDLINE_MSATTRIBUTE is controlled from three columns:
- CLASS
- OBJECT_ID
- CHANGE_RELEASE_DATE.
CLASS is not indexed. but this, apparently, is not very selective. OBJECT_ID is the leading column of the composite index, but the other columns are not related to the subquery.
But the biggest problem is CHANGE_RELEASE_DATE. It is not indexed at all. This is bad news, as your primary key is looking for a date, which is then compared to CHANGE_RELEASE_DATE. If the column is not indexed, the database must read the table to get its values.
- ATTID
- CHANGE_ID
- OBJECT_ID ()
- CHANGE_RELEASE_DATE ()
- CLASS ()
- OLD_VALUE
ATTID , ? , , . ATTID CHANGE_ID OLD_VALUE, , . CLASS, CHANGE_RELEASE_DATE OBJECT_ID.
, ( ), . , WHERE ( ) . OBJECT_ID ATTID , ,
- INDEX SKIP SCAN, REDLINE_MSATTRIBUTE_INDEX1 CHANGE_ID
- , CLASS CHANGE_RELEASE_DATE.
, , (CHANGE_RELEASE_DATE, CLASS, OBJECT_ID, ATTID). , , , .