> I tried indexing the quarantine table by one of its fields "mail_id": > > CREATE INDEX quarantine_idx_mail_id ON quarantine(mail_id); > > and the query now takes a reasonable <1 second for 85000 rows. >
I thought the 'PRIMARY KEY' in the 'CREATE TABLE quarantine' statement created an implicit index. Maybe im wrong? PRIMARY KEY (mail_id,chunk_ind) ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ 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/