Mikhail Ramendik wrote: > We add a header_messageblk_idnr field to the dbmail_messages table. It > should contain the messageblk_idnr of the messageblk that contains the > header of this message.
Actually, on more thinking, strike that. The same trick can be implemented without database redundancy, by including a third table into just one query. Paul: could you please merge your is_header usage ASAP? I actually think I know how to code a much faster FETCH (about 5 to 8 times faster by my estimate), as soon as is_header usage is in place. I'd like to try my hand against that version. Yours, Mikhail Ramendik > > This will help us speed up IMAP header fetches, probably to the possible > maximum. All the queries *except* the messageblk query in _im_fetch() > can be united into one or two "global" queries, one per fetch, not one > per message. Then we buffere the data in RAM, along with the > header_messageblk_idnr for every message to be fetched. > > Now, for every mesage, we just run a query for one table, > dbmail_messageblks, and on an indexed field too! This query will likely > be *very* fast. > > This is also useful for searches, especially if we don't rewrite the > searching code itself as yet. The header for every message that has to > be parsed/searched will be delivered somewhat fastet this way. > > But of course, the main improvement will be for FETCHes. Incidentally. > this is the threshold that needs to be crossed before dbmail is usable > for me personally ;) > > Yours, Mikhail Ramendik > > > > > _______________________________________________ > Dbmail-dev mailing list > Dbmail-dev@dbmail.org > http://twister.fastxs.net/mailman/listinfo/dbmail-dev >