Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-4249

Optionally add OPTION(RECOMPILE) to incremental snapshot queries

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Minor Minor
    • 1.8.0.CR1
    • 1.6.3.Final
    • sqlserver-connector
    • None
    • False
    • False

      As described in https://debezium.zulipchat.com/#narrow/stream/302529-users/topic/Poor.20query.20performance.20on.20incremental.20snapshot.20.2Bcomposite.20PK

      We noticed progressively poor performance during the incremental snapshot of a N-N table with composite primary key

      After adding OPTION(RECOMPILE) the performance issue was completely fixed which notes a parameter sniffing problem

      OPTION(RECOMPILE) is not a silver bullet in that it can cause CPU pressure on the database due to execution plan recompiles on each SELECT statement

      With that said it would be nice to have it as an option with the default of not recompiling

      I can try putting a PR together for this but I'm not a java guy

              Unassigned Unassigned
              danthimself Thiago Dantas (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: