发明名称 METHOD AND DEVICE FOR ONLINE INDEX REBUILDING
摘要 The present invention discloses an online index rebuilding method and apparatus, where the method includes: receiving an online index rebuilding request; adding, according to the online index rebuilding request, 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 by using the latch; after the latch is obtained, reserving storage space of a shadow index for an original index of the data table, 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 after the adding the entry address of the shadow index to a root page of the data table is completed; building the shadow index in the storage space of the shadow index according to data of the original 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.
申请公布号 EP3142021(A1) 申请公布日期 2017.03.15
申请号 EP20150835811 申请日期 2015.07.14
申请人 Huawei Technologies Co. Ltd. 发明人 ZHU, Zhongchu;YAO, Li;WU, Kesong
分类号 G06F17/30 主分类号 G06F17/30
代理机构 代理人
主权项
地址