Method and apparatus for realizing globally unique index

    公开(公告)号:US11880367B2

    公开(公告)日:2024-01-23

    申请号:US17622794

    申请日:2020-03-31

    申请人: ZTE CORPORATION

    摘要: Disclosed in embodiments of the present disclosure are methods and apparatuses for realizing a globally unique index, which are applicable to a distributed database. One of the methods includes: receiving a structured query language, SQL, request, obtaining a conflict detection SQL statement corresponding to the SQL request and calculating an expected value; issuing the conflict detection SQL statement to each database node for execution; obtaining an execution result of the conflict detection SQL statement, and comparing the execution result of the conflict detection SQL statement with the expected value; and when the execution result of the conflict detection SQL statement is less than or equal to the expected value, processing an original SQL statement of the SQL request, and issuing the original SQL statement to the each database node for execution.