On Freitag, 22. Juni 2007 Jesse Norell wrote: > Check http://www.dbmail.org/mantis/view.php?id=305 for I think 4 > different possible queries to address this. I'm not an sql wizard > myself, so I'll not address whether yours is correct or not (I don't > know offhand).
So yes, my statement was correct, but according to EXPLAIN, this is even
faster:
DELETE FROM dbmail_physmessage WHERE id NOT IN
(SELECT physmessage_id FROM dbmail_messages);
it took 808609.896 ms to run, still quite long, but much faster than the
previous statement :-). The VACUUM ANALYZE afterwards shrinked a lot of
things down.
mfg zmi
--
// Michael Monnerie, Ing.BSc ----- http://it-management.at
// Tel: 0676/846 914 666 .network.your.ideas.
// PGP Key: "curl -s http://zmi.at/zmi.asc | gpg --import"
// Fingerprint: EA39 8918 EDFF 0A68 ACFB 11B7 BA2D 060F 1C6F E6B0
// Keyserver: www.keyserver.net Key-ID: 1C6FE6B0
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ DBmail mailing list [email protected] https://mailman.fastxs.nl/mailman/listinfo/dbmail
