On Wed, Jul 02, 2003 at 09:44:34AM -0600, Jesse Norell wrote: > With upcoming schema changes (cached headers, etc.), it'd > probably be worth stepping back and looking at the best way to > handle message storage, and see what improvements can be made. > Even something as simple as a messageblk flag as to whether the > block contains headers or the body could fix the above issue.
Flagging the messageblk containing the headers would be nice as I believe it would allow requests for the headers of all messages within a mailbox to be retrieved in a single query rather than a SELECT ... LIMIT 1 for each message. Currently, on mysql at least, retrieving the headers, statuses and sizes for all messages in a mailbox causes four queries per message. xn