Skip to main content

Module partition

Module partition 

Source

Structsยง

PartitionParams
Settings for partition_table, bundled to make it harder to accidentally put arguments in the wrong order.
Prefix ๐Ÿ”’

Traitsยง

PrimaryKeyProber ๐Ÿ”’
Probing operations of KeyProber, as a trait so tests can substitute an in-memory implementation. See KeyProberโ€™s methods for each operationโ€™s contract.

Functionsยง

children_prefixes ๐Ÿ”’
Splits parent into prefixes one character longer. i.e. prefix โ€œaโ€, upper bound โ€œbโ€ in table with pks: [โ€œaโ€, โ€œabโ€, โ€œabcโ€, โ€œabdโ€, โ€œafโ€, โ€œbbโ€] will return: [โ€œabโ€, โ€œafโ€].
compute_boundaries ๐Ÿ”’
partition ๐Ÿ”’
partition_table
Computes up to num_workers - 1 partition boundaries that divide the primary key space into num_workers roughly even partitions. At most max_probed_prefixes prefixes are probed in MySQL to bound the time spent. Each prefix probe costs a few queries that should each be quick (index dives, instead of table scans).