Piotr Wadas wrote:
>  dbmail_physmessage        |   994
>  dbmail_fromfield          |   994
>   
These match - that is good - should be one from header for each message
>  dbmail_envelope           |  1057
>   
A couple extra maybe?? Not too far off.
>  dbmail_tofield            |  5011
>   
This is about 5x the correct size - this is just a view so nothing can 
be deleted from it. This count be close to the fromfield count. Only one 
to and from header per message.
>  dbmail_mimeparts          | 10001
>  dbmail_partlists          | 11467
>   
This would mean that we have 11.5 or so parts per message? I have an 
average of 3.75 parts per messages.
>  dbmail_headervalue        | 18115
>   
This seems to be about right at 18 headers per message.


So from looking at this I think that partlists rows are being left 
around, thus the mimeparts can't be dropped because they are still being 
pointed to.

Try:
select count(*) from dbmail_partlists left join dbmail_physmessage on 
(dbmail_physmessage.id=dbmail_partlists.physmessage_id) where 
dbmail_physmessage.id is null;

That should confirm if there are any parts being left there. Count=0 
means no leftovers, Count>0 then there are extra parts not being cleaned 
up. Perhaps a constraint was missed, or maybe you just need to optimize 
all of the tables to regain the space.

-Jon


-- 
Scanned for viruses and dangerous content by MailScanner

_______________________________________________
DBmail mailing list
DBmail@dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail

Reply via email to