Re: [Dbmail-dev] dbmail-util not cleaning messages

2009-09-21 Thread Michael Monnerie
On Samstag 19 September 2009 Paul J Stevens wrote: Jorge, You're mixing up tables here. there is *no* direct connection between messages and partlists. There *is* a 1-1 connection between physmessages and partlists, and that is maintained by a database constraint. But mimeparts have a 1-N

Re: [Dbmail-dev] dbmail-util not cleaning messages

2009-09-20 Thread Paul J Stevens
Jorge Bastos wrote: mysql DELETE dbmail_mimeparts.* FROM dbmail_mimeparts LEFT JOIN dbmail_partlists ON (dbmail_mimeparts.id=dbmail_partlists.part_id) WHERE dbmail_partlists.physmessage_id IS NULL; I'm pretty sure we don't use that kind of query. I wasn't even aware of this trick. It was

Re: [Dbmail-dev] dbmail-util not cleaning messages

2009-09-20 Thread Paul J Stevens
Jorge Bastos wrote: Allow me other question for this, with 40492 mimeparts to delete, or 11 mimeparts to delete also, it takes barely the same time. Normal? Is that a question? -- Paul Stevens

Re: [Dbmail-dev] dbmail-util not cleaning messages

2009-09-20 Thread Jorge Bastos
Jorge Bastos wrote: Allow me other question for this, with 40492 mimeparts to delete, or 11 mimeparts to delete also, it takes barely the same time. Normal? Is that a question? Yap, it takes almost the same time to delete a lot or a few messages.

[Dbmail-dev] dbmail-util not cleaning messages

2009-09-19 Thread Jorge Bastos
Paul/Jon, I ask your help on another thing! For sure dbmail-util is not cleaning messages! I was checking the function on dm_db.c , and after a: dbmail-util -d -y the query: r = db_query(c, SELECT p.id FROM %smimeparts p LEFT JOIN %spartlists l ON p.id =

Re: [Dbmail-dev] dbmail-util not cleaning messages

2009-09-19 Thread Jorge Bastos
-dev] dbmail-util not cleaning messages Paul/Jon, I ask your help on another thing! For sure dbmail-util is not cleaning messages! I was checking the function on dm_db.c , and after a: dbmail-util -d –y the query: r = db_query(c, SELECT p.id FROM %smimeparts p

Re: [Dbmail-dev] dbmail-util not cleaning messages

2009-09-19 Thread Jorge Bastos
mysql DELETE dbmail_mimeparts.* FROM dbmail_mimeparts LEFT JOIN dbmail_partlists ON (dbmail_mimeparts.id=dbmail_partlists.part_id) WHERE dbmail_partlists.physmessage_id IS NULL; I'm pretty sure we don't use that kind of query. I wasn't even aware of this trick. It was something I used

Re: [Dbmail-dev] dbmail-util not cleaning messages

2009-09-19 Thread Jorge Bastos
Allow me other question for this, with 40492 mimeparts to delete, or 11 mimeparts to delete also, it takes barely the same time. Normal? Only one question, In every run, the partlists part, always has 0 unconnected partlists's. Is it normal? Example below. --- Setting DELETE status