-
Enhancement
-
Resolution: Done
-
Major
-
None
-
None
-
False
-
-
False
-
-
In SqlUtils#allMinableLogsQuery, we construct a query that combines two distinct subqueries: one that retrieves the redo logs and another that retrieves the archive logs.
The portion of this query that retrieves the redo logs performs a left join against the archive log table to remove from the result set any online logs that may match sequence numbers; however, this left join can be expensive in some environments that maintain substantial amounts of archive log history.
To optimize this query and make sure we do not break connector behavior, we need to perform the following changes:
- Remove the LEFT JOIN on V$ARCHIVED_LOG and any WHERE-clause predicates
- Change the query to specify L.STATUS = 'CURRENT' rather than L.STATUS != 'UNUSED'
- In LogFileCollector's deduplicateLogFiles, invert the behavior, favoring archive logs and removing redo log entries if there are matching archive logs.