I recently looked at an A2Billing 1.34 install that was slow to browse the rates through the GUI. There were over 800,000 rates which was causing the slowdown. While probably not a good idea to have so many rates, it is possible to speed up this screen by creating an index in MySQL.
To do that –
Log in to MySQL –
(you should be able to get the username/password you need from the top of the /etc/asterisk/a2billing.conf file)
Create an index on the destination field in the cc_ratecard table –
To find out why queries are taking so long in MySQL you can turn on the slow-query log in MySQL.
See here for more info – http://dev.mysql.com/doc/refman/5.1/en/slow-query-log.html