this post was submitted on 15 Aug 2023
1 points (100.0% liked)

Lemmy PostgreSQL

33 readers
2 users here now

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

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.

[โ€“] [email protected] 1 points 1 year ago* (last edited 1 year 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