John Hansen wrote:
(1) Only select the header messageblk when only the header or a part


of it is to be fetched on IMAP.

That's what the is_header field is going to be used for.



Q: why is the headers split from the message? If it's an attempt to
minimize disk io when only fetching imap headers, then that will only do
that ever so slightly, since it will still have to do lots of seeks, and
for postgresql it will choose not to use an index if the planner
realizes that a sequence scan might be faster. Again, for PostgreSQL you
may be able to improve on this by clustering the table on an index over
is_header...

Q: Why not add to the messageblks table fields containing parsed
headers:

Making changes like these may well improve performance dramatically in many use cases. Problem is the current code base was not designed to allow such changes without breaking functionality all over the place. And I do mean *all over*.

Or doesn't imap / pop3 work that way,.... Do they need to receive the
actual headers, or is a list enough? In any case, it would simplify
creating custom (webmail) interfaces...

Even for finding relevant messages a headerfields table would help a lot. After that selecting the full headers would be much faster.



--
  ________________________________________________________________
  Paul Stevens                                  mailto:[EMAIL PROTECTED]
  NET FACILITIES GROUP                     PGP: finger [EMAIL PROTECTED]
  The Netherlands________________________________http://www.nfg.nl

Reply via email to