On 2010-10-31 23:40, Jorge Bastos wrote:
>> In that case, do not delete the messages but set their status to 2,

> So the query will be:

> update dbmail_messages as t1,tmp as t2 set deleted_flag=2 where
> t2.id=t1.message_idnr ;

Setting the deleted_flag=2 is not the same as setting status=2!

deleted_flag=2 is meaningless.

It's a IMAP-only flag, used when you 'delete' a message in imap. But 
messages are  not actually deleted until you expunge the mailbox, but 
expunge only looks for messages that have deleted_flag=1

> Now, one thing I've noticed is, when running the dbmail-util commands, it
> takes about one hour, to delete 196 mimeparts or 2000.

I notice it does the full query twice, which shouldn't be necessary. 
Optimizing that would cut the overall time in half, still taking half an 
hour in your situation.

Not much we can do to improve that. Cleaning up orphaned mimeparts is by 
definition a slow process. It requires a full index scan on the 
mimeparts table.

-- 
   ________________________________________________________________
   Paul Stevens                                      paul at nfg.nl
   NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
   The Netherlands________________________________http://www.nfg.nl
_______________________________________________
Dbmail-dev mailing list
Dbmail-dev@dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev

Reply via email to