Hi again,
I have done some more thinking about the database structure.
I am not sure of the performance gain with a fast header table
structure.
This would be ideal with a single table and one VARCHAR column
for each _interesting_ header. How do we know what the clients
think are interesting headers?
The ideal world would be SQL statements like
SELECT subject, from, To FROM fastheadertable WHERE mailbox=
The question is, how many of these multiple selects do the imap
clients issue?
WE DO GAIN if the clients very often request headers from
multiple mail in the mailbox, but do the clients make these
requests often? Mozilla only do this when the mailbox cache is
non existant.
I beleive in splitting the message into two parts, header and body.
What is the mail server performance loss to do something like
1. SELECT header FROM headers WHERE mailbox=
2. With some carefully written C code extract the interesting
headers.
Operation 2 can be distributed to another server.
This last option shuffles more data, but there is only one select
statement, as well as in the first example.
With the last option we do not need to do any more client request
logging :-).
A header, might be around 4 kbyte. How much does this cost?
I know there are people with huge mail boxes.
Well, any comments?
/Magnus
P.S. Why is a message split into multiple message blocks? Is this
because of some limitations in the SQL servers?
Jesse Norell wrote:
Hello,
(moving this to dbmail-dev)
My vision here is a "fastheaders" table which has a message number and
half a dozen columns defined. On some regular basis, or upon message
insertion, the messageblks table is scanned and the first entry of each
new message number, which is the header, is parsed for these fast headers
and they are stored for future searches and quick/short header listings.
An idea we've started (not completed) implimenting in weDBmail
along these lines is dynamically parsing/caching the headers. Any
time the message headers are requested, it'll check the "header cache"
table and use entries if found, but if not, it'll parse the headers
from messageblks and use the results while saving appropriate ones in
the cache. Could make the pop3 and imap servers do that as well.
--
Jesse Norell
jesse (at) kci.net
_______________________________________________
Dbmail-dev mailing list
Dbmail-dev@dbmail.org
http://twister.fastxs.net/mailman/listinfo/dbmail-dev