by the way if you run pleroma develop branch, you should upgrade, i reduced postgresql load by 80% (i have some other ideas on how to optimize with prefetching, too)

@Transflux prefetching and carefully leveraged joins!

@kaniini thanks, interesting. I'll consider that as move on. Optimize before its too late :blobpopcorn:

@Transflux basically, most of the Pleroma SQL query load is from calling Object.normalize() to fetch the source of truth object associated with an activity. by prefetching the objects using a join and fake ecto relation, we can opportunistically turn many of those Object.normalize() calls into effective no-ops from SQL perspective.

@kaniini I'm using python/sqlAlchemy so things will look different and more abstracted here. Just thought it's a more general tweak. Using a slave... (is it called like that?!- when u dump the queries to remote db). I'm dabbling around so no clue where and what to optimize yet

Sign in to participate in the conversation

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!