The following issue has been RESOLVED.
======================================================================
http://www.dbmail.org/mantis/view.php?id=373
======================================================================
Reported By: benjamin9999
Assigned To: paul
======================================================================
Project: DBMail
Issue ID: 373
Category: Database layer
Reproducibility: always
Severity: tweak
Priority: normal
Status: resolved
target:
Resolution: fixed
Fixed in Version: 2.0 branch
======================================================================
Date Submitted: 27-Jun-06 22:05 CEST
Last Modified: 30-Jun-06 14:58 CEST
======================================================================
Summary: really slow header retrieval on pgsql, 100x speedup
Description:
now my users are filled with joy, and yours will be also.
db.c in 2.0.9, line 3967... the same statement is in the latest SVN for
2.0 tree
sorry for no diff, but it's a one-liner anyway.
snprintf(query, DEF_QUERYSIZE,
"SELECT messageblk "
"FROM dbmail_messageblks blk, dbmail_messages msg "
"WHERE blk.physmessage_id = msg.physmessage_id "
"AND msg.message_idnr = '%llu' "
"ORDER BY blk.messageblk_idnr ASC LIMIT 1", msg_idnr);
/*MR added LIMIT 1 - we are only getting the header, and therefore only
use one row anyway */
if we just want the header, why aren't we using the "is_header" flag which
has a better index ???
snprintf(query, DEF_QUERYSIZE,
"SELECT messageblk "
"FROM dbmail_messageblks blk, dbmail_messages msg "
"WHERE blk.physmessage_id = msg.physmessage_id "
"AND msg.message_idnr = '%llu' "
"AND blk.is_header = 1 ", msg_idnr );
mailbox-list operations (read, squirrelmail) up to 100x faster on my
system.
======================================================================
----------------------------------------------------------------------
paul - 30-Jun-06 14:58
----------------------------------------------------------------------
fixed in svn
Issue History
Date Modified Username Field Change
======================================================================
27-Jun-06 22:05 benjamin9999 New Issue
30-Jun-06 14:58 paul Note Added: 0001286
30-Jun-06 14:58 paul Assigned To => paul
30-Jun-06 14:58 paul Status new => resolved
30-Jun-06 14:58 paul Resolution open => fixed
30-Jun-06 14:58 paul Fixed in Version => 2.0 branch
======================================================================