-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Paul J Stevens schrieb: > Giulio Ferro wrote: >> All of the above commands took no more than 25 minutes... > > Cool. That's fast. Disk IO is not the bottleneck. >
[...] > It's not the number of rows in messageblks that is your problem, but the > rediculous rowscan in the explain output. Could you run that 'explain > select' again? > > Messageblks contains at least two rows for every message. One for the > headers, and one or more for the rest of the message in chucks of 500K. > > You could try dropping the physmessage_id_key index and run the 'explain > select' with and without it. Could well be the physmessage_id_index is > redundant. In fact, it probably is given that physmessage_id is already > declared a foreign key. > IIRC, it is so: If there is a foreign key, there is also a (unique) index. Paul, IIRC, dbmail-util runs "ANALYZE TABLE"? If he has never run the utility, so the index may not be optimal because of none run of "ANALYZE TABLE" ever and he will not have goot statistics. Uwe -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iQIcBAEBAgAGBQJJA35LAAoJEEJXG7BUuynnsv4P/iYTA6r5V7RoOW0rsKmGjIZW rtv9KOuYcxzlw9zbu4o2ZSyIT3g2w5Qliz74va9F4mPM/GG7Xx3CQmdINdUanpbU v6jtYYKInga0tHo8r2a6zu5JMze7SUXJ2zqOJQ5B9qD2Mc6ccF1Qp9U/uzXwBZXU pCsRLjijQWSht2wUUWBee+LA9UGOxOYEWa0OWGAra4dOhu+O1DRW7SLWIeKys6/+ jUEoFkWEGJEOBvfShuQf7bnrw61SWO3/peg1d1vj4t2xqe/yJT3TVG+k9yg6o4wP vvcOvS9aROZ9A3EBmt1B5LhtSiy32mW8JTSa2RifSvFf9gYjOYavGgC0BxA3wAPw cO82u1Pm+JGi2V7eSBfmOiaECWkJwHKZ0/z1UD2+DnsLEvH68D0836B2U1jeDOzp McUkJgAjnE0dEYO4ymJwMZKWnNo7pP6gAWqCy9t4Pkpap8YoD1OZVuPLphHhri+I LbTizFajd0AWYAS1f8xDQSBFOz4P4rCaC00R3Yz1OF/IxdJP093dUQ6qWiQrCs+7 1Rr7ereTawvX/+i821MzrIbO7pHtssVfr/nmwCISIKvbgfkOcXL51M83VJ/Grw7e wg+X5Aa7OJIzT7IpfnHsYKHBYDLTWRJ5EnMcEgQBgoxedebHvvr/3PNJWMyTLFGr YOORuYx1+EScYUVIjRoe =7DBs -----END PGP SIGNATURE----- _______________________________________________ DBmail mailing list [email protected] https://mailman.fastxs.nl/mailman/listinfo/dbmail
