oracledb_cdc: Pre-filter relevant transactions via a common table expression#4541
oracledb_cdc: Pre-filter relevant transactions via a common table expression#4541josephwoodward wants to merge 4 commits into
Conversation
28f7fac to
2dc26c1
Compare
|
Commits Review
|
2dc26c1 to
acb3dd0
Compare
|
Commits Review LGTM |
acb3dd0 to
1c26871
Compare
|
Commits Review LGTM |
1c26871 to
f157e50
Compare
|
Commits Review LGTM |
14b1ed7 to
5200836
Compare
| SELECT /*+ ORDERED USE_NL(R) */ | ||
| V.SCN, | ||
| V.SQL_REDO, | ||
| V.OPERATION_CODE, | ||
| V.TABLE_NAME, | ||
| V.SEG_OWNER, | ||
| V.TIMESTAMP, | ||
| V.XID, | ||
| V.COMMIT_SCN, | ||
| V.CSF | ||
| FROM V$LOGMNR_CONTENTS V | ||
| JOIN relevant_xids R ON R.RXID = V.XID | ||
| WHERE V.SCN > :3 AND V.SCN <= :4%s |
There was a problem hiding this comment.
The outer CTE query selects all rows for the relevant XIDs (JOIN relevant_xids R ON R.RXID = V.XID) with only the pdbFilter applied — it omits the per-table predicate (tablePred) that the non-CTE logMinerQuery applies to DML codes. processRedoEvent adds every OpInsert/OpUpdate/OpDelete to the txn cache and publishes them all on commit, with no further table filtering downstream. As a result, when a single transaction touches both an included table and a table outside include, the CTE path will capture and publish the DML for the non-included table as well, whereas the non-CTE path filters it out. This is a silent divergence in include/exclude semantics between the two modes. If this is intentional, it's worth documenting; otherwise the outer query (and/or processRedoEvent) should re-apply the table filter.
confirmed=true
|
Commits
Review The CTE-based LogMiner query is a solid optimization and the refactor into
|
|
Commits
The two substantive commits ( Review The change adds an opt-in I traced the new query construction, bind-variable mapping ( LGTM |
No description provided.