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

saga alpha event scanner delete duplicate events sql optimization

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • saga-0.2.0
    • pack-0.3.0
    • Saga
    • 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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment