Method, device, server and storage medium for creating database index
A technology for creating indexes and databases, applied in the field of databases, can solve problems such as other transactions cannot modify data tables, business systems cannot operate effectively, and the duration increases
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0035] figure 1 It is a flowchart of a method for creating a database index provided by Embodiment 1 of the present invention. This embodiment is applicable to the situation where other transactions are allowed to modify the data table when creating a database index for the data table. The method can be created by creating a database index It can be implemented by a device, which can be implemented by software and / or hardware, and can generally be integrated in a database server. The method specifically includes the following steps:
[0036] Step 101, according to the index creation transaction, determine the data table to be indexed.
[0037] When a user needs to create or rebuild an index for a data table in the database, an index creation transaction can be initiated, which includes the data table to be indexed, so that the data to be created can be determined based on the index creation transaction surface. When rebuilding the index, you need to delete the existing inde...
Embodiment 2
[0072] figure 2 It is a flowchart of a method for creating a database index provided by Embodiment 2 of the present invention. This embodiment is optimized on the basis of the above embodiments. Specifically, by creating an auxiliary table and an auxiliary trigger for triggering and saving modified records to merge index data based on modified records in auxiliary tables. The method specifically includes the following steps:
[0073] Step 201, according to the index creation transaction, determine the data table to be indexed.
[0074] Step 202, add an IX lock and an S lock to the data table.
[0075] Step 203, adding the data dictionary of the index to be created to the database system table, determining the corresponding index to be created, and creating an auxiliary table and corresponding auxiliary triggers for storing modification records.
[0076] While adding the data dictionary of the index to be created in the database system table, an auxiliary table and correspo...
Embodiment 3
[0103] Figure 4 It is a flow chart of a method for creating a database index provided by Embodiment 3 of the present invention. This embodiment is optimized on the basis of the above embodiments. Specifically, by re-adding the S lock to the data table according to whether the The lock succeeds to determine whether to continue merging the modified records in the auxiliary table into the index data. The method specifically includes the following steps:
[0104] Step 301, according to the index creation transaction, determine the data table to be indexed.
[0105] Step 302, adding an IX lock and an S lock to the data table.
[0106] Step 303, adding the data dictionary of the index to be created to the database system table, determining the corresponding index to be created, and creating an auxiliary table and corresponding auxiliary triggers for saving modification records.
[0107] Step 304, releasing the S lock on the data table.
[0108] Step 305, according to the data d...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com