I have a composite primary key, which together turns out to be rather large (~2000 bytes). I have no performance considerations, I just would like a primary key to enforce uniqueness.
MySql doesn't like long primary keys. Is there a way around this? Perhaps to only enforce uniqueness, without building an index?
I wouldn't want to use ASCII instead of UTF8 just to enable a primary key (UTF8 character takes 3 bytes).
My table is defined as follows:
CREATE TABLE `configuration` (
`Section` varchar(200) NOT NULL,
`StoredKey` VARCHAR(200) NOT NULL,
`ServiceName` VARCHAR(300) NOT NULL,
`ServiceMajorVersion` int unsigned NOT NULL,
`ServiceMinorVersion` int unsigned NOT NULL,
`ServiceInstanceID` VARCHAR(100) NOT NULL,
`StoredValue` VARCHAR(1024)
, PRIMARY KEY (`Section`, `StoredKey`, `ServiceName`, `ServiceMajorVersion`, `ServiceMinorVersion`, `ServiceID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;