Paolo Cravero as2594 wrote:
Cami wrote:

Keep far far away from these queries, they are slow.

But probably keep data consistent...

They do the same thing really.

DELETE FROM quarantine WHERE time_num < UNIX_TIMESTAMP() - 7*24*60*60;
(make sure you have an index on time_num)

 From http://www.ijs.si/software/amavisd/README.sql.txt :

CREATE TABLE quarantine (
  mail_id    varchar(12)   NOT NULL,    -- long-term unique mail id
  chunk_ind  integer unsigned NOT NULL, -- chunk number, starting with 1
  mail_text  text          NOT NULL,    -- store mail as chunks up to 16 kB
  PRIMARY KEY (mail_id,chunk_ind),
  FOREIGN KEY (mail_id) REFERENCES msgs(mail_id) ON DELETE CASCADE
) ENGINE=InnoDB;


I don't see any "time_num" column there. How can that work for you?

I am using a (slightly) patched version of amavisd-new.

I'm assuming that Mark has benchmarked the difference in
speed between the time_num index approach vs the DELETE
CASCADE approach and found it to be quicker.

Mark, can you confirm what your findings were?

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
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