Posts: 2

Topic: Inefficient query on Domains and Account page

I noticed that the page that displays the domain list and information such as number of accounts, aliases and quotas was too slow.We have about 185 domains, 2000 accounts and 2000 aliases. It was taking about 2 minutes for the page to display and I have a separate database server.I have rewritten the query so that it's efficient and runs under a second now.

The file I have modified is iredadmin/libs/mysql/domain.pyThe original piece of code is as it follows: