Begge splitter en stor tabel, men på forskellige niveauer. Partitioning splitter én tabel op over flere filer inde i en enkelt MySQL-server. Sharding splitter data op over flere uafhængige servere. Partitioning hjælper en tabel, der er for stor til én fil; sharding hjælper en workload, der er for stor til én maskine.
Partitioning (én server)
events (
id , created_at DATETIME, payload JSON,
(id, created_at)
) ((created_at)) (
p2024 LESS THAN (),
p2025 LESS THAN (),
p2026 LESS THAN ()
);
