micentosh wrote:| 3102 | root | localhost:39108 | amavisd | Query | 188 | Sending data | DELETE FROM msgrcpt WHERE mail_id IN (SELECT mail_id FROM msgs WHERE content IN ('U', 'M', 'H', 'O', 'C') AND time_num < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 30 DAY))
) |
Same issue with this forum post:
www.iredmail.org/forum/topic2370-login-to-iredadminpro-is-too-slow.html
Here's solution:
- Create one more SQL index in Amavisd database:
$ mysql -uroot -p
mysql> USE amavisd;
mysql> ALTER TABLE `msgs` ADD INDEX `msgs_idx_content` (`content`);
- Download attached patch "delete_amavisd_db.patch". It's patch for iRedAdmin-Pro-LDAP-1.6.2 or iRedAdmin-Pro-MySQL-1.3.0.
- Copy or upload this patch to your mail server which has iRedAdmin-Pro running. Assume it's /root/delete_amavisd_db.patch.
- Open shell terminal, and change current working directory to the root directory of the iRedAdmin-Pro. For example, on RHEL/CentOS/Scientific Linux:
# cd /var/www/iRedAdmin-Pro-xxx/
Replace iRedAdmin-Pro-xxx with the real edition name and version number, e.g. iRedAdmin-Pro-LDAP-1.6.2, or iRedAdmin-Pro-MySQL-1.3.0.
- Try to patch it with command 'patch --dry-run':
# patch -p4 --dry-run < /root/delete_amavisd_db.patch
patching file libs/amavisd/log.py
You should get the same output message "patching file libs/amavisd/log.py" as above command. If it's not the same, do *NOT* execute below commands, and reply this forum post to let me know it doesn't work for you.
- If you got the same output message, it's safe to apply this patch immediately (without '--dry-run')
# patch -p4 < /root/delete_amavisd_db.patch
patching file libs/amavisd/log.py
- Restarting Apache web server is required.
Please reply this forum post to share with us whether it works for you.
Post's attachmentsdelete_amavisd_db.patch 1 kb, 85 downloads since 2011-10-21
You don't have the permssions to download the attachments of this post.