the current table structure is inefficient. MessageRow uses a composite key. this is not only slow to look up but also means that all relationships use two keys. MessageFlags contains only booleans, is frequently queried and is related to MessageRow by a one-to-one association. this structure creates many slow and unnecessary joins.
i propose to move the flags data from MessageFlags to MessageRow and remove MessageFlags though UIDs may not be unique across mailboxes, i think that it should be possible to use a calculated PK. each UID must be less than 32 bits so longer (64 bit) primary keys could be used with the high bits filled by the mailbox id and the low bits by the uid. opinions? if the table structure is changed then upgrade scripts will be needed. where should these scripts be committed and how we ask users to run them? - robert --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
