दुवैले ठूलो table विभाजन गर्छन्, तर फरक तहमा। Partitioning ले एउटा table लाई एउटै MySQL server भित्र धेरै files मा विभाजन गर्छ। Sharding ले डेटालाई धेरै स्वतन्त्र servers मा विभाजन गर्छ। Partitioning ले एउटा file का लागि धेरै ठूलो table लाई मद्दत गर्छ; sharding ले एउटा machine का लागि धेरै ठूलो workload लाई मद्दत गर्छ।
Partitioning (एउटा server)
events (
id , created_at DATETIME, payload JSON,
(id, created_at)
) ((created_at)) (
p2024 LESS THAN (),
p2025 LESS THAN (),
p2026 LESS THAN ()
);
