- 41
- 64
- free_palestine : text wall
- 108
- 115
so yesterday I restored "simps" and "simps for" but made them only count post votes
the reason is because the queries that would include comment votes take way too long when they run on powerusers which causes timeouts that slow down the whole site
here's 2 examples that use my user id
QUERY 1 (for my simps): 25 seconds
explain analyze SELECT commentvotes.user_id AS commentvotes_user_id, count(commentvotes.user_id) AS count_1
FROM commentvotes JOIN comments ON comments.id = commentvotes.comment_id
WHERE comments.ghost = false AND comments.is_banned = false AND comments.deleted_utc = 0 AND commentvotes.vote_type = 1 AND comments.author_id = 1 GROUP BY commentvotes.user_id ORDER BY count(commentvotes.user_id) DESC;
QUERY PLAN
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sort (cost=101326.43..101331.71 rows=2111 width=12) (actual time=25292.671..25371.754 rows=1844 loops=1)
Sort Key: (count(commentvotes.user_id)) DESC
Sort Method: quicksort Memory: 135kB
-> Finalize GroupAggregate (cost=100675.05..101209.87 rows=2111 width=12) (actual time=25266.703..25370.338 rows=1844 loops=1)
Group Key: commentvotes.user_id
-> Gather Merge (cost=100675.05..101167.65 rows=4222 width=12) (actual time=25266.210..25368.234 rows=4089 loops=1)
Workers Planned: 2
Workers Launched: 2
-> Sort (cost=99675.02..99680.30 rows=2111 width=12) (actual time=25174.301..25174.732 rows=1363 loops=3)
Sort Key: commentvotes.user_id
Sort Method: quicksort Memory: 113kB
Worker 0: Sort Method: quicksort Memory: 113kB
Worker 1: Sort Method: quicksort Memory: 111kB
-> Partial HashAggregate (cost=99537.35..99558.46 rows=2111 width=12) (actual time=25172.482..25173.130 rows=1363 loops=3)
Group Key: commentvotes.user_id
Batches: 1 Memory Usage: 241kB
Worker 0: Batches: 1 Memory Usage: 241kB
Worker 1: Batches: 1 Memory Usage: 241kB
-> Nested Loop (cost=119.48..99291.83 rows=49104 width=4) (actual time=70.552..25064.475 rows=25093 loops=3)
-> Parallel Bitmap Heap Scan on comments (cost=119.04..12311.25 rows=4943 width=4) (actual time=57.412..246.591 rows=4380 loops=3)
Recheck Cond: (author_id = 1)
Filter: ((NOT ghost) AND (NOT is_banned) AND (deleted_utc = 0))
Rows Removed by Filter: 263
Heap Blocks: exact=3882
-> Bitmap Index Scan on comments_user_index (cost=0.00..116.08 rows=12353 width=0) (actual time=36.276..36.277 rows=14518 loops=1)
Index Cond: (author_id = 1)
-> Index Scan using commentvotes_pkey on commentvotes (cost=0.44..17.28 rows=32 width=8) (actual time=1.447..5.654 rows=6 loops=13141)
Index Cond: (comment_id = comments.id)
Filter: (vote_type = 1)
Rows Removed by Filter: 0
Planning Time: 0.764 ms
JIT:
Functions: 60
Options: Inlining false, Optimization false, Expressions true, Deforming true
Timing: Generation 19.575 ms, Inlining 0.000 ms, Optimization 6.942 ms, Emission 122.562 ms, Total 149.079 ms
Execution Time: 25453.921 ms
(36 rows)
QUERY 2 (for the ppl i simp for): 13 seconds
explain analyze SELECT comments.author_id AS comments_author_id, count(comments.author_id) AS count_1
FROM comments JOIN commentvotes ON comments.id = commentvotes.comment_id
WHERE comments.ghost = false AND comments.is_banned = false AND comments.deleted_utc = 0 AND commentvotes.vote_type = 1 AND commentvotes.user_id = 1 GROUP BY comments.author_id ORDER BY count(comments.author_id) DESC;
QUERY PLAN
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sort (cost=234059.08..234064.81 rows=2293 width=12) (actual time=13511.566..13632.448 rows=3074 loops=1)
Sort Key: (count(comments.author_id)) DESC
Sort Method: quicksort Memory: 241kB
-> Finalize GroupAggregate (cost=233350.16..233931.10 rows=2293 width=12) (actual time=13502.703..13630.725 rows=3074 loops=1)
Group Key: comments.author_id
-> Gather Merge (cost=233350.16..233885.24 rows=4586 width=12) (actual time=13502.611..13628.135 rows=6597 loops=1)
Workers Planned: 2
Workers Launched: 2
-> Sort (cost=232350.14..232355.87 rows=2293 width=12) (actual time=13404.805..13405.287 rows=2199 loops=3)
Sort Key: comments.author_id
Sort Method: quicksort Memory: 203kB
Worker 0: Sort Method: quicksort Memory: 199kB
Worker 1: Sort Method: quicksort Memory: 197kB
-> Partial HashAggregate (cost=232199.23..232222.16 rows=2293 width=12) (actual time=13398.724..13399.556 rows=2199 loops=3)
Group Key: comments.author_id
Batches: 1 Memory Usage: 369kB
Worker 0: Batches: 1 Memory Usage: 369kB
Worker 1: Batches: 1 Memory Usage: 369kB
-> Nested Loop (cost=0.87..231821.34 rows=75577 width=4) (actual time=81.541..13275.534 rows=52615 loops=3)
-> Parallel Index Scan using cvote_user_index on commentvotes (cost=0.44..129890.24 rows=78687 width=4) (actual time=64.216..9154.821 rows=55000 loops=3)
Index Cond: (user_id = 1)
Filter: (vote_type = 1)
Rows Removed by Filter: 90
-> Index Scan using comments_pkey on comments (cost=0.43..1.30 rows=1 width=8) (actual time=0.072..0.072 rows=1 loops=165000)
Index Cond: (id = commentvotes.comment_id)
Filter: ((NOT ghost) AND (NOT is_banned) AND (deleted_utc = 0))
Rows Removed by Filter: 0
Planning Time: 0.721 ms
JIT:
Functions: 60
Options: Inlining false, Optimization false, Expressions true, Deforming true
Timing: Generation 8.837 ms, Inlining 0.000 ms, Optimization 11.450 ms, Emission 167.933 ms, Total 188.220 ms
Execution Time: 13635.714 ms
(33 rows)
so i need help, how do I make them run faster or what indexes do I make, i didnt actually read the explain analyze
outputs I posted here cuz im too lazy and need to take a shower rn so the answer might be pretty obvious (correct answer gets 50k marseybuckerinos and a code contributer badge)
- 2
- 13
- 4
- 23
- 6
- 44
A new feature just enabled in Notepad++ :
— Notepad++ (@Notepad_plus) January 25, 2023
If you don’t agree with its politics views, Notepad++ will add random characters in your source code.
Orange Site:
- 7
- 13
- 11
- 26
Can confirm, /h/slackernews was created to troll Hacker News and /g/ effectively.
- 1
- 8
I can't bypass the paywall if anyone can pls post a mirror btw.
- 23
- 77
- 24
- 65
Despite all the r-sluration in the world, rdrama.net is a really well designed website.
- 1
- 28
Good ol' Mog attacking random users.
- 36
- 64
- 18
- 18
- 22
- 58
- 45
- 137
Basically teamblind.com threads are great drama if someone with an account makes screenshots, but shit if you don't have anybody with an account who can make screenshots, so I got a couple of the admins to agree to pay a bonus to people who post blind screenshots in blind threads.
@Aevann please don't ban me for posting groomercord screenshots
/h/slackernews mods it would be nice if you could sticky this thread.
EDIT: Oops I didn't post this in /h/slackernews lol. Jannies pls move
- Nixoncrats_for_trump : Report
- free_palestine : programming is boring
- 116
- 206
https://www.teamblind.com/post/Reddit-is-doing-layoffs-SAkLHfEz
IN IN IN
I can't register a full account because I don't have a disposable work email from a massive company.
Someone even tried to warn these cute twinks it was coming two months ago lol
https://www.teamblind.com/post/reddit-layoffs-ZziYJA8p
HR or damage control team at work but also spitting facts like people who work at reddit are inherently lazy (except for the CEO of course)
SPEZ IS PERSONALLY FIXING THE PROBLEM BTW
MORE COPE
Once the initial shock wore off everyone started remembering what a shit platform reddit has become lol
Just a little more stuff I dug up. Unfortunately I don't think Kethryvis got the giga-mop, but she did like a reddit admins post on twitter which implies some internal drama:
https://x.com/CKWang/status/1618348168063905792?s=20
You'd think Kethryvis and her actual thesis on Internet Drama damage control (https://www2.sjsu.edu/anthropology/docs/projectfolder/Moellenberndt_Christine_thesis.pdf) would be able to figure out how to deescalate all of this, but come think of it, we should really thank her sometime for making http://rdrama.net possible.
- 9
- 11
i cant find a btn to do that
- 8
- 26
Guess the founder didn't really want the Unauthorized practice of law charge, he just wanted attention . Score another one for the Saul Goodmans of the world.
Relevant orange site: https://news.ycombinator.com/item?id=34529340
- 11
- 24
- 6
- 25
- Murdervann : wholesome
- free_palestine : ai will rule :3
- PolPotEnjoyer : They should learn to mine
- melgibsonsDUI : this is what happens when you don't do it for free
- 110
- 223