> Here most of the time is spent in the hash join for: > > Hash Cond: (cachedgroupmembers_2.memberid = main.id) > What indexes do you have on cachedgroupmembers? (Also, I presume your Postgres is reasonably well tuned, autovacuumed, etc)