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
view the rest of the comments
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.
313617
copy comment temp table into main post table, kicking off (1 row)
-------------+-------------+-------------+-------------+-------------+-------------+-------------+---------
3336308.709
3,336 seconds.. 55.6 minutes