Well the odd thing in my opinion is the fact that the explain shows the same query plan in both installations while the data in the database is _very_ different. On my mac, the installation was just for trying to port dbmail to OS X. The database contains 6 messages making a total size of 220 bytes for 1 user; no updates or changes. The production environment contained over 150000 messages (5,3 Gb) for nearly 900 users and had updates on the table constantly. The database gets vacuumed daily but the problem was found right after importing a dump - in fact the problem already existed for a few days but after a diskcrash we were forced to use a backup (pg_dump) it became _really_ apparent.

Philip Warner heeft op donderdag, 21 nov 2002 om 14:11 (Europe/Amsterdam) het volgende geschreven:

At 11:12 AM 21/11/2002 +0100, Roel Rozendaal - IC&S wrote:
We encountered this problem using version 7.2.3; i just checked on my mac and version 7.2.1 has the same EXPLAIN output.

I'm still trying to understand this behaviour. Has the messageblks table been vacuumed recently? In the case of the database on your mac, it may be just a copy loaded from a dump, in which case vacuum is not necesary...

[Reason is ask: One possible cause of this problem is a table *file* that is very large and full of unused space. The optimizer does a very bad job in this case].



----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 03 5330 3172          |                 ___________ |
Http://www.rhyme.com.au          |                /           \|
                                 |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/

_______________________________________________
Dbmail mailing list
Dbmail@dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail

Reply via email to