So I'm in the process of migrating over to a new host and after testing the migration, I've run into an issue. There's one query that's taking about 3-5 seconds and slowing down my TTFB.
This is the assignments query from here (https://github.com/anahitasocial/anahita/blob/master/src/components/com_actors/domains/entitysets/component.php#L38).
Here's the EXPLAIN:
From what it looks like, it's checking every row in the database to see if it matches the criteria which is taking a long time as my nodes table has over 100k records.Any ideas on how to speed it up? I've checked that my table looks okay and tried some basic ways to speed it up, but not sure where to continue.