v.21.3New Feature
Add insert_shard_id setting for targeted inserts in distributed tables
Add setting insert_shard_id to support insert data into specific shard from distributed table. #19961 (flynn).Why it matters
This feature allows users to target data insertion to a designated shard within a distributed table, solving the problem of directing inserts precisely in sharded environments. It enhances control over data distribution and can improve data management and performance.How to use it
Use the settinginsert_shard_id when performing inserts into a distributed table to specify the shard id explicitly. Example:SET insert_shard_id = 1;
INSERT INTO distributed_table (...) VALUES (...);