Lets try it !
This page demonstrates creation of data partitions on the fact tables to improve query processing by causing
parallel processing of data.
Prerequisites
Make sure a multi-partition processing instance and the designdb
database are created before proceeding. Please refer to the Design Overview section for detailed instructions.
Operation
- Create tables enabled with Database Partitioning
- Populate data into the tables. Data is stored in logical data partitions based on the hashing key specified
Best Practices
- Choose a partition key column with large number of values (high cardinality), preferably unique key column to ensure even distribution of data across logical partitions
- Avoid choosing a partitioning key with a column that is updated frequently. This could incur additional overhead on the update to relocate the row to another partition
- Try to choose a partitioning key column that has a simple datatype, such as fixed-length character or integer. The hashing performance can benefit from doing this versus selecting a complex datatype
- Ensure unique indexes are a superset of the partitioning key
- Try to use the same partitioning key on tables that get joined. This increases the collocation of joins.