• RoundSparrow@lemmy.mlM
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    11 months ago

    This is on an empty freshly deleted data directory for PostgreSQL, and the average is skewed down in favor of the first INSERT performance which grows higher and higher the larger the table gets

    The UPDATE statements in this list:

    This is with the optimized post_aggregates logic to only do one update per INSERT instead of 3. If you add up the average times for the UPDATE statements in the screen shot, you see about 10ms of overhead for every INSERT of a comment.

    • RoundSparrow @ BT@bulletintree.comOPM
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      11 months ago

      313617

                        status_message                       
      

      copy comment temp table into main post table, kicking off (1 row)

       avg     |     min     |     q1      |   median    |     q3      |     p95     |     max     | repeats  
      

      -------------±------------±------------±------------±------------±------------±------------±--------
      3336308.709

      3,336 seconds… 55.6 minutes