Uploaded image for project: 'Apache ServiceComb'
  1. Apache ServiceComb
  2. SCB-885

saga alpha event scanner delete duplicate events sql optimization

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: saga-0.2.0
    • Fix Version/s: pack-0.3.0
    • Component/s: Saga
    • Labels:
      None

      Description

      The count of txevents is about 100m. and this sql spend too much time so that the event scanner is blocked.

      [SQL]DELETE FROM TxEvent t WHERE t.type = 'SagaEndedEvent' AND t.surrogateId NOT IN ( SELECT MAX(t1.surrogateId) FROM TxEvent t1  WHERE t1.type = 'SagaEndedEvent'  GROUP BY t1.globalTxId);

       

      时间: 1308.376s

       

      受影响的行: 5

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                OLiuGian FuChenGeng
                Reporter:
                OLiuGian FuChenGeng
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: