Re:Performace with 1000+ teams? 2 Years, 2 Months ago
Karma: 0
well, i did found out what the problem was.
There are NO indexes setup on the regular database setup. Because of this this query:
SELECT c. * , COUNT( m.id ) AS members
FROM _teams AS c
LEFT JOIN _teams_members AS m ON m.teamid = c.id
GROUP BY c.id
ORDER BY c.name ASC
LIMIT 0 , 20
this one really hanged, TAKING 17 SECONDS!!
i used, explain to see what to do. I added an index on m.id and on c.id. Now the query is ALOT faster (taking only 0.3 seconds)