I have read the documentation (http://dev.mysql.com/doc/refman/5.1/en/partitioning.html), but I would like, in your own words, what it is and why it is used.
- Is it mainly used for multiple servers so it doesn’t drag down one server?
- So, part of the data will be on server1, and part of the data will be on server2. And server 3 will “point” to server1 or server2…is that how it works?
- Why does MYSQL documentation focus on partitioning within the same server…if the purpose is to spread it across servers?
The idea behind partitioning isn’t to use multiple servers but to use multiple tables instead of one table. You can divide a table into many tables so that you can have old data in one sub table and new data in another table. Then the database can optimize queries where you ask for new data knowing that they are in the second table. What’s more, you define how the data is partitioned.
Simple example from the MySQL Documentation:
This allows to speed up e.g.:
Dropping old data by simple:
Database can speed up a query like this:
Knowing that all data is stored only on the p2 partition.