Querying for guild name accounts for at 1 additional query per character listed. Another query "to disalow lower lvl gm to view accounts of other gms" accounts for an additional query per character, making a total of 75+ queries for a list of 25. At scale, that's 300 queries on a page of 100, 600 queries on a page of 200, etc.
The cause is that these queries are being executed inside the for loop building the rows for each character. So the initial query should probably be improved / data eager loaded to include the additional data via join.
This should significantly improve the overall performance of that particular page, especially in cases where someone sets pagination limits to 100+.
Querying for guild name accounts for at 1 additional query per character listed. Another query "to disalow lower lvl gm to view accounts of other gms" accounts for an additional query per character, making a total of 75+ queries for a list of 25. At scale, that's 300 queries on a page of 100, 600 queries on a page of 200, etc.
The cause is that these queries are being executed inside the
for
loop building the rows for each character. So the initial query should probably be improved / data eager loaded to include the additional data via join.This should significantly improve the overall performance of that particular page, especially in cases where someone sets pagination limits to 100+.