-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Description
second phase of
There used to be a proposal pr, close it because of the change is samll and move core info to this issue, new info will be update in this issue.
Description
The existing implementation of TIKV_REGION_STATUS and TIKV_REGION_PEERS fetches all tables' regions infomation, which results in the same overhead of fetching a small table's regions infomation as a large one. To avoid this, some of the predicates can be pushed down to reduce unnecessary data transfer overhead.
-
tikv_region_status:
The optimization idea is to addTikvRegionStatusExtractorto push downDB_NAME,TABLE_NAME,INDEX_NAME,TABLE_ID,INDEX_IDand addtikvRegionStatusRetrieverto fetch regions information by region range keys, which construct start key and end key pairs from pushed down predicates.Task list:
TiDB:- tikv_region_status extractor planner: add tikvregionstatus extractor #30649
- tikv_region_status executor executor: add tikvregionstatus executor #30648
PD:
We need to support endKey in ScanRegions http interface. -
tikv_region_peers:
The optimization idea is to addTikvRegionPeersExtractorto push downSTORE_IDandREGION_IDand addtikvRegionPeersRetrieverto fetch regions information from PD.Task list:
TiDB:- add extractor for
tikv_region_peersplanner: add extractor for tikv_region_peers #30656 - add retriver for
tikv_region_peersexecutor: add retriver for tikv_region_peers #30657
PD: None
- add extractor for