Having run a pod for a fairly long time, and noticing load times taking progressively longer as the database gets progressively larger, I’m looking for ways to improve performance without hacking the EvilQuery that produces the stream. (I prototyped a hack that ignored posts older than a certain age regardless of origin and it worked very well, but I haven’t taken the time to repair all the tests that broke as a result.)
One thing I’m targeting are old posts that federated to my pod. Does anyone have a query that I could run against my pod’s database that would delete posts older than a certain age that didn’t originate from my pod (so my users wouldn’t lose any of their data)? Any pointers would be welcome; I’m reasonably good at hacking SQL, but I haven’t dived deeply into understanding the diaspora schema.