james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "robert burrell donkin" <robertburrelldon...@gmail.com>
Subject Re: [IMAP] MessageRow and MessageFlags
Date Tue, 13 Mar 2007 13:31:04 GMT
On 3/13/07, Danny Angus <danny@apache.org> wrote:
> I don;t know but.. I think it is because they were added later, and we
> generally like to avoid changing the datamodel in ways which aren't
> backwards compatible.

yeh

the more i look into the model, though, the more i wonder whether
achieving good performance won't require changes

> If we change the datamodel we should provide a migration script for
> upgrades, need to either release db alter-table & update scripts or a
> whole export-drop-create-import cycle.

IMAP is going to need upgrade scripts for the indexing in any case

> Could you improve things using better indices?

i'll trial some more indexes and see

> a 1-1 relationship
> shouldn't be less efficient than a big table if the foreign keys are
> properly indexed.

both tables are very small but frequently queries. the message_flags
contains booleans only. i suspect that the join will always be less
efficient in practice.

but the main issue in this case is 1-1 relationships are tough for OR
mapping layers to optimize. torque frequently performs unnecessary
joins across to message_flags. ATM this results in tables scans which
may be possible to index away but avoiding the unnecessary joins means
hand editing the generated source.

- robert

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message