I found that the index on the tables weren't set up efficiently for mysql
(and I think postgresql too).  I did the following, which made a *very*
substantial speed gain:

mysql> alter table messages add index(mailbox_idnr);
mysql> alter table messages add index(unique_id);
mysql> alter table messages add index(status);
    
mysql> alter table messageblks add index(mailbox_idnr);

mysql> alter table mailboxes add index(owner_idnr);
mysql> alter table mailboxes add index(name);
mysql> alter table mailboxes add index(permission);

mysql> alter table users add index(userid);

I got these indexes from looking at the queries in the source code. I'm no
mysql guru, so there are probably more efficient indexes that could be
applied. However prior to doing these queries, I was spiking to a load of
about 4 on my dual PIII database with only about 4-5 concurrent lan-based
imap reads on large mailboxes (admittedly with about 12G of messages...).
Afterwards, the database server load dropped about .2.  (The pop/imap
server, similar spec still had a hernia, but that's due I think to the
amount of concurrent rapid reads I was doing...)

Hope this helps -- and if it does, perhaps post back to the list so these
indexes (or similar) can be added to the CVS.

/Mark


On 16/8/02 5:18 AM, "Johan Ekenberg" <[EMAIL PROTECTED]> wrote:

> Hi!
> 
> I just installed dbmail. When using it through IMAP from a webmail application
> it's extremely slow! It's much slower than UW-IMAPD which is also running on
> the server (on a different port). I thought dbmail would speed things up?
> 
> Could I be doing something wrong or is dbmail-imap really this slow? On a
> larger mailbox ~400 mails it's almost completely useless.
> 
> Thanks for your help,
> /Johan Ekenberg
> 
> _______________________________________________
> Dbmail mailing list
> Dbmail@dbmail.org
> https://mailman.fastxs.nl/mailman/listinfo/dbmail


Reply via email to