This chapter discusses partitioning as implemented in MySQL
5.1. An introduction to partitioning and partitioning
concepts may be found in Section 17.1, “Overview of Partitioning in MySQL”.
MySQL 5.1 supports several types of partitioning, which
are discussed in Section 17.2, “Partition Types”, as well as
subpartitioning (also known sometimes as composite partitioning),
which is described in Section 17.2.5, “Subpartitioning”.
Methods of adding, removing, and altering partitions in existing
partitioned tables are covered in
Section 17.3, “Partition Management”. Table maintenance
commands for use with partitioned tables are discussed in
Section 17.3.3, “Maintenance of Partitions”.
Important: Partitioned tables
created with MySQL versions prior to 5.1.6 cannot be read by a 5.1.6
or later MySQL Server. In addition, the
INFORMATION_SCHEMA.TABLES table cannot be used if
such tables are present on a 5.1.6 server. Beginning with MySQL
5.1.7, a suitable warning message is generated instead, to alert the
user that incompatible partitioned tables have been found by the
Important: If you are using
partitioned tables which were created in MySQL 5.1.5 or earlier, be
sure to see Section D.1.3, “Changes in release 5.1.6 (01 February 2006)” for more information and
suggested workarounds before upgrading to MySQL
5.1.6 or later.
The partitioning implementation in MySQL 5.1 is still undergoing
development and is not yet production-ready. Much the same is true
of this chapter: Some of the features described herein are not yet
actually implemented, and others might not yet function exactly as
described (for example, the
DATA DIRECTORY and
INDEX DIRECTORY options for partitions are
adversely affected by Bug #13520). We have attempted to note these
discrepancies in this chapter. Before filing bug reports, we
encourage you to check the following resources:
This is the official discussion forum for those interested in or
experimenting with MySQL Partitioning technology. It features
announcements and updates from MySQL developers and others. It
is monitored by members of the Partitioning Development and
MySQL Partitioning Architect and Lead Developer Mikael Ronström
frequently posts articles here concerning his work with MySQL
Partitioning and MySQL Cluster.
A MySQL news site featuring MySQL-related blogs, which should be
of interest to anyone using my MySQL. We encourage you to check
here for links to blogs kept by those working with MySQL
Partitioning, or to have your own blog added to those covered.
MySQL 5.1-alpha binaries are now available from
However, for the latest partitioning bugfixes and feature additions,
you can obtain the source from our BitKeeper repository. To enable
partitioning, you need to compile the server using the
--with-partition option. For more information about
building MySQL, see Section 2.8, “MySQL Installation Using a Source Distribution”. If you have
problems compiling a partitioning-enabled MySQL 5.1 build, check the
Forum and ask for assistance there if you don't find a
solution to your problem already posted.