|
MySQL Partitions - Different Data Stores for Each by Lost at 3:28 am EST, Dec 27, 2008 |
Each PARTITION clause may specify either an INDEX DIRECTORY, a DATA DIRECTORY, or both, where the partition's indexes and/or data are to be stored. Suppose our orders database has grown to the point where it holds records relating to several million orders, tens of thousands of customers, hundreds of stores, thousands of salespeople, and so on, and it's threatening to outgrow our single 250-GB disk. We're going to upgrade our database server by adding 3 new disks, and the four disks are mounted as /data0, /data1, /data2, and /data3. We'll partition the table into 4 partitions - one per disk - and use HASH partitioning on the orders table to obtain an even distribution of data. On each disk, we'll create an orders directory and within this directory we'll create separate subdirectories for the corresponding partition's indexes and data. Using the orders_hash table described previously as a model, we can create a table that follows this scheme like this:
Using this, you could put each partition of a table on a different EBS store. |
|
|