Paolo Cravero as2594 wrote:
Mark Martinec wrote:
/* I am currently filling-up a test database in order to test if the
maintainance is actually faster with these DELETE CASCADE statements.
All 2.4 native. */
Let us know of the results.
Got to 15GB of quarantine so far. I'm heading for 30 at least.
I have roughly 60gb of quarantine data on each of our production
machines.
It would be better (faster) to clean more often, perhaps every hour.
I'll try this too, but I doubt so.
Yesterday stats from MySQL's slow-queries log:
# Query_time: 28676 Lock_time: 0 Rows_sent: 0 Rows_examined: 6452078
DELETE quarantine FROM quarantine LEFT JOIN msgs USING(mail_id)
WHERE msgs.mail_id IS NULL;
--
# Query_time: 12868 Lock_time: 0 Rows_sent: 0 Rows_examined: 6428954
DELETE msgrcpt FROM msgrcpt LEFT JOIN msgs USING(mail_id)
WHERE msgs.mail_id IS NULL;
--
# Query_time: 3225 Lock_time: 0 Rows_sent: 0 Rows_examined: 991368
DELETE FROM maddr
WHERE NOT EXISTS (SELECT sid FROM msgs WHERE sid=id)
That's a total of 12.4 hours.
Keep far far away from these queries, they are slow.
DELETE FROM msgs WHERE time_num < UNIX_TIMESTAMP() - 7*24*60*60;
DELETE FROM msgs WHERE time_num < UNIX_TIMESTAMP() - 60*60 AND content IS NULL;
DELETE FROM quarantine WHERE time_num < UNIX_TIMESTAMP() - 7*24*60*60;
(make sure you have an index on time_num)
Issuing an "EXPLAIN" on those queries the engine shows that no index is
Cami
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/