

Removed by mod
How did all this fascism get into my anticommunism?
Removed by mod
Removed by mod
Removed by mod
Removed by mod
Removed by mod
Removed by mod
Hexbear is a Lemmy instance
Good evening Dessalines, I have started looking at the posts query.
The lowest hanging fruit I think would be if we could replace some of the joins with WHERE EXISTS
which can have a huge impact on the query time. It seems this is supported in Diesel: https://stackoverflow.com/a/74300447
This is my first time looking at the codebase so I can’t tell yet which joins are purely for filtering (in which case they can be replaced by WHERE EXISTS
) and which joins need to be left in because some of their columns end up in the final SELECT
I can’t tell for sure yet but it also looks like this might also be using LIMIT...OFFSET
pagination? That can be a real drag on performance but isn’t as easy to fix.
EDIT:
Looking some more, and reading some linked github discussion - I think to really get this out of the performance pits will require some denormalization like a materialized view or manual cache tables populated by triggers. I really like the ranking algorithm but so far I’m finding it difficult to optimize from a query perspective
I should have some time tonight to start looking at this. Thanks for the info!
Does the project maintain a list of known slow queries? This is my favorite type of work
Removed by mod
Removed by mod
Removed by mod
Removed by mod