Michael Mayer wrote:
An interesting idea for performance improvement of the messages table would be a PRIMARY KEY consisting of mailbox_idnr and status, as the

Of course, the physmessage_id must be added to that index as well, so that it is unique (and the primary key really should be unique). As I said, it could even make sense to leave out the status, as most mailboxes can be sorted and filtered in memory. So the final idea is to use this setup:

PRIMARY KEY(mailbox_idnr, physmessage_id)

UNIQUE(message_idnr)

message_idnr INT AUTO_INCREMENT

mailbox_idnr INT

Maybe INDEX(unique_id), if you need it for something. Delete all the other indexes on the messages table.

That's it for today, promised,

Michael
_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail

Reply via email to