Partitioning and Sharding Configuration
Who this is for
For users who have completed regular field modeling and now need structural optimization for large-table performance or distributed scenarios.
What this solves
You can configure partitioning or sharding at table-design time and move performance and scalability constraints forward into schema design.
Prerequisites
- You have completed base table and field configuration.
- You have selected the correct target database type.
Steps
- First confirm whether the
PartitioningorShardingtab appears. Result: you can determine whether the current database supports this advanced capability.
MySQL, MariaDB, and TiDB showPartitioning; PostgreSQL Citus showsSharding. - When configuring partitioning, enable
Enable partitioningfirst, then choose partition type. Result: the system exposes parameters by type.RANGE/LISTfit range or enum scenarios, whileHASH/KEYfit even-distribution scenarios. - Configure partition expression or fields, then complete partition count or partition definitions. Result: complete partition statements appear in DDL on the right.
- When configuring sharding, choose
Reference TableorDistributed Tablemode first. Result: the system generates corresponding Citus semantics.
After selectingDistributed Table, you must specify a distribution column. - Recheck configuration against business query patterns. Result: partition keys or sharding keys align with high-frequency filters and join paths.
Done when
- Corresponding advanced configuration appears and is completed under the target database.
- DDL includes partitioning or sharding related statements.
- Key selection aligns with business access paths.
Common pitfalls and failure handling
- Wrong database type causes tabs not to appear. Confirm database type first.
- Do not mix partition expressions and partition fields without a clear strategy.
- Sharding configuration is incomplete if no distribution column is set for distributed tables.
- Configuring partitioning/sharding only for "having advanced features" may increase maintenance cost. Confirm real business value first.