On 5/3/06, Paolo Cravero as2594 <[EMAIL PROTECTED]> wrote:
>>>> We have a 50GB (fifty GigaB) quarantine table on the production server,
>>>> and the last quarantine purge run took 14 hours to complete. All traffic
>>>> was queued because of DB locks and timeouts. We clean every second day
>>>> for spam >30 days and viruses >15 days, but will probably move to
>>>> once-a-week.
>
I created an amavisd-new 2.4 lab environment with MySQL 4.1.13 (while
production is 2.3.x on 4.1.16). Filled up some 35GB of quarantine and
then run the periodic maintenance SQL DELETE statement that takes
advantage of ON DELETE CASCADE features.

The LAB server is different and slower from our production environment,
but I could notice an improvement.

I deleted way more data than usual, 36GB vs. 1GB of the production
environment. This query took 8,2 hours to complete:


Are you sure that it did not take approx two-thirds (8h/14h) of the
old time only because you have approx two-thirds (35GB/50GB) less data
on the test server?

Also is the amount of data you deleted a typo? i dont quite understand
what you mean when you delete 36GB when you only had 35GB to begin
with. Maybe you mean that the 'quarantine' table was 35GB, but the
whole test database was 50?


I wonder if the FOREIGN KEY "connection" is created/honored on existing
data after adding it on populated tables with the ALTER TABLE statements
from The Docs. Hints?


Yes, the constraint will not be added if your pre-existing data
violates it. Also keep in mind the time it takes to add the
constraint, which you shouldve noticed when you added the FK
references on the test database. There should be no reason why your
data in its current state will violate the FK constraint, but just in
case you might want to add the FK right after a cleanup run just to be
safe.


-------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to