Thomas,

> Thanks a lot for clarification! Rereading RELEASE_NOTES I can not find
> anything telling me to do so - but for some strange reason I modified
> the primary key on all four storage-tables.
>
> If I remember it right I did so as MySQL didn't allow me to use columns
> not being part of my primary key for partitioning (if not using hashes).

There is probably no harm done declaring a composite field as a primary
key, knowing that one of its components is already known to be unique.

For performance sake, make sure that the provided index still ensures
quick access based on what used to be primary key (e.g. msgs.mail_id)
(it probably does with MySQL, although it may not be so with other db).

> My tables / partitions have been created like the following:
>
> CREATE TABLE IF NOT EXISTS `mail_quarantine` (
>    `mail_id` varbinary(12) NOT NULL default '',
>    `partition_tag` integer DEFAULT 0,
>    `chunk_ind` int(10) unsigned NOT NULL,
>    `mail_text` blob,
>    PRIMARY KEY  (`mail_id`,`chunk_ind`, `partition_tag`)
> ) ENGINE=InnoDB DEFAULT CHARSET=latin1 PARTITION BY RANGE(partition_tag) (
>      PARTITION p0 VALUES LESS THAN (6),
>      PARTITION p1 VALUES LESS THAN (12),
>      PARTITION p2 VALUES LESS THAN (18),
>      PARTITION p3 VALUES LESS THAN (24),
>      PARTITION p4 VALUES LESS THAN (30),
>      PARTITION p5 VALUES LESS THAN (36),
>      PARTITION p6 VALUES LESS THAN (42),
>      PARTITION p7 VALUES LESS THAN (48),
>      PARTITION p8 VALUES LESS THAN (54)
> );
>
> (and that's why I was confused regarding mail_id). If there is a better
> way of doing so please let me know!

I admit I hadn't played with partitions on MySQL beyond reading the docs
and ensuring the new guarantees are obeyed by amavisd.

Experience reports and recommendations are welcome.

  Mark

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to