Table of Contents

MySql - Primary Key (clustered index or cluster index)

About

Logical Data Modeling - Primary Key (Id, Name) in MySql

Advice

From primary_key glossary - When choosing primary key values, consider:

Storage

For an InnoDB tables:

Example

CREATE TABLE phpgw_lang (
lang varchar(5) NOT NULL DEFAULT '',
app_name varchar(100) NOT NULL DEFAULT 'common',
message_id varchar(255) NOT NULL DEFAULT '',
content text,
PRIMARY KEY(lang,app_name(75),message_id(100))
);

where:

Documentation / Reference