I'm sorry if this is too much info, this is the complete logged transaction
when I open a message for reading from Outlook:
================================================
Apr 14 14:41:35 www1 dbmail/imap4d[25569]: IMAPClientHandler(): line read for
PID 25569
Apr 14 14:41:35 www1 dbmail/imap4d[25569]: COMMAND: [000W UID FETCH 8132 (UID
FLAGS BODY.PEEK[] INTERNALDATE)]
Apr 14 14:41:35 www1 dbmail/imap4d[25569]: arg[0]: 'FETCH'
Apr 14 14:41:35 www1 dbmail/imap4d[25569]: arg[1]: '8132'
Apr 14 14:41:35 www1 dbmail/imap4d[25569]: arg[2]: '('
Apr 14 14:41:35 www1 dbmail/imap4d[25569]: arg[3]: 'UID'
Apr 14 14:41:35 www1 dbmail/imap4d[25569]: arg[4]: 'FLAGS'
Apr 14 14:41:35 www1 dbmail/imap4d[25569]: arg[5]: 'BODY.PEEK'
Apr 14 14:41:35 www1 dbmail/imap4d[25569]: arg[6]: '['
Apr 14 14:41:35 www1 dbmail/imap4d[25569]: arg[7]: ']'
Apr 14 14:41:35 www1 dbmail/imap4d[25569]: arg[8]: 'INTERNALDATE'
Apr 14 14:41:35 www1 dbmail/imap4d[25569]: arg[9]: ')'
Apr 14 14:41:35 www1 dbmail/imap4d[25569]: IMAPClientHandler(): Executing
command uid...
Apr 14 14:41:35 www1 dbmail/imap4d[25569]: db_query(): executing [SELECT
permission,seen_flag,answered_flag,deleted_flag,flagged_flag,recent_flag,draft_flag
FROM mailboxes WHERE mailbox_idnr = 1]
Apr 14 14:41:35 www1 dbmail/imap4d[25569]: db_query(): executing [SELECT
message_idnr, seen_flag, recent_flag FROM messages WHERE mailbox_idnr = 1 AND
status<2 AND unique_id!="" ORDER BY message_idnr ASC]
Apr 14 14:41:36 www1 dbmail/imap4d[25569]: db_query(): executing [SELECT
message_idnr FROM messages WHERE unique_id!=""ORDER BY message_idnr DESC LIMIT
0,1]
Apr 14 14:41:37 www1 dbmail/imap4d[25569]: next_fetch_item(): args[idx = 2] =
UID (returning 3)
Apr 14 14:41:37 www1 dbmail/imap4d[25569]: next_fetch_item(): args[idx = 3] =
FLAGS (returning 4)
Apr 14 14:41:37 www1 dbmail/imap4d[25569]: next_fetch_item(): args[idx = 7] =
INTERNALDATE (returning 8)
Apr 14 14:41:37 www1 dbmail/imap4d[25569]: Fetching msgID 8132 (fetch num
8133)^M
Apr 14 14:41:37 www1 dbmail/imap4d[25569]: db_query(): executing [SELECT
seen_flag, answered_flag, deleted_flag, flagged_flag, draft_flag, recent_flag
FROM messages WHERE message_idnr = 8132 AND status<2 AND unique_id != '' AND
mailbox_idnr = 1]
Apr 14 14:41:37 www1 dbmail/imap4d[25569]: db_query(): executing [SELECT
messageblk FROM messageblks WHERE message_idnr= 8132 ORDER BY messageblk_idnr]
Apr 14 14:41:37 www1 dbmail/imap4d[25569]: db_query(): executing [SELECT
messageblk FROM messageblks WHERE message_idnr= 8132 ORDER BY messageblk_idnr]
Apr 14 14:41:37 www1 dbmail/imap4d[25569]: db_start_msg(): starting,
stopbound: '(null)'
Apr 14 14:41:37 www1 dbmail/imap4d[25569]: mime_readheader(): entering mime
loop
Apr 14 14:41:37 www1 dbmail/imap4d[25569]: mime_readheader(): found double
newline; header size: 28 lines
Apr 14 14:41:37 www1 dbmail/imap4d[25569]: db_start_msg(): found singlepart
msg
Apr 14 14:41:37 www1 dbmail/imap4d[25569]: update msgbuf updating
4969277292544 395136991232 395136991232 578697433832226816
Apr 14 14:41:37 www1 dbmail/imap4d[25569]: update msgbuf: entire fit
Apr 14 14:41:37 www1 dbmail/imap4d[25569]: update msgbuf succes NOMORE
Apr 14 14:41:37 www1 dbmail/imap4d[25569]: db_start_msg(): exit
Apr 14 14:41:37 www1 dbmail/imap4d[25569]: Dumping range: (1,0) - (1,91)
Apr 14 14:41:37 www1 dbmail/imap4d[25569]: db_query(): executing [SELECT
messageblk FROM messageblks WHERE message_idnr= 8132 ORDER BY messageblk_idnr]
Apr 14 14:41:37 www1 dbmail/imap4d[25569]: db_query(): executing [SELECT
internal_date FROM messages WHERE mailbox_idnr= 1 AND message_idnr = 8132 AND
unique_id!=""]
Apr 14 14:41:37 www1 dbmail/imap4d[25569]: IMAPClientHandler(): Finished
command uid
================================================
/Johan
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf
> Of Roel Rozendaal - IC&S
> Sent: Monday, April 14, 2003 1:06 PM
> To: [email protected]
> Subject: Re: [Dbmail] Necessary to select/sort all messages for each
> IMAP read??
>
>
> Hmm that's not quite efficient.. Could you send the imap commands
> outlook is executing? You'll find them in the log; try the following:
>
> tail -f /var/log/mail.log | grep imap4d | grep COMMAND
>
> regards roel
>
>
> Johan Ekenberg heeft op maandag, 14 apr 2003 om 12:01
> (Europe/Amsterdam) het volgende geschreven:
>
> > Hi!
> >
> > I'm evaluating dbmail for a large mailsystem which is required to
> > handle just a small number of mailboxes but with a very large number
> > of mail in each, at least 200000 per mailbox.
> >
> > So, I imported ~39000 mail into dbmail 1.1 and connected by IMAP with
> > MS Outlook. I see that dbmail runs a very time consuming query *each
> > time* I request a message:
> >
> > SELECT message_idnr, seen_flag, recent_flag
> > FROM messages
> > WHERE mailbox_idnr = 1 AND status<2 AND unique_id!=""
> > ORDER BY message_idnr ASC
> >
> > This query takes about 1.5 sec with 39000 mail so it will be
> > impossible with 200k mail. Is there anything to do about this? Is this
> > query really necessary for each read mail? In my mind, the main
> > advantage with using SQL is to be able to quickly select *one* item
> > out of millions by use of clever indexes? Here we select *all*
> > messages and on top of that we sort them?
> >
> > Grateful for your help, dbmail looks so promising except for the above!
> >
> > Regards,
> > /Johan Ekenberg
> >
> > _______________________________________________
> > Dbmail mailing list
> > [email protected]
> > https://mailman.fastxs.nl/mailman/listinfo/dbmail
> >
>
> _________________________
> R.A. Rozendaal
> ICT Manager
> IC&S
> T: +31 30 2322878
> F: +31 30 2322305
> www.ic-s.nl
>
> _______________________________________________
> Dbmail mailing list
> [email protected]
> https://mailman.fastxs.nl/mailman/listinfo/dbmail