-
公开(公告)号:US20170109384A1
公开(公告)日:2017-04-20
申请号:US15394242
申请日:2016-12-29
Applicant: HUAWEI TECHNOLOGIES CO., LTD.
Inventor: Zhongchu ZHU , Li YAO , Kesong WU
IPC: G06F17/30
CPC classification number: G06F16/2228 , G06F16/00 , G06F16/22 , G06F16/2282 , G06F16/23
Abstract: The present disclosure discloses an online index rebuilding method and apparatus, where the method includes: receiving an online index rebuilding request; adding a schema shared lock to a data table corresponding to an identifier of the data table; obtaining a latch and obtaining a structure control right of the data table; reserving storage space of a shadow index for an original index, allocating an entry address of the shadow index, and adding the entry address of the shadow index to a root page of the data table; releasing the latch; building the shadow index in the storage space of the shadow index; updating an index entry address on the root page of the data table to the entry address of the shadow index after the latch is obtained again; and releasing the latch obtained again and the schema shared lock. Therefore, efficiency of online index rebuilding is improved.