A method, device, electronic device and storage medium for creating a SQL Server database index
By regularly processing the change information and fragmentation rate of SQL Server database indexes and updating the search tree, the matching problem caused by index fragmentation is solved, and the accuracy and user experience of the index are improved.
Patent Information
- Application Number
- CN202210241385.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-11
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2042-03-11
AI Technical Summary
In the SQL Server database, fragmentation will occur after the index is updated, causing the user to enter keywords that cannot match the corresponding file, affecting the user experience.
Regularly obtain change information in the index database, execute query instructions, process index change condition fields that cannot be matched, update the search tree, send node update information, judge and reorganize or rebuild the index to reduce fragmentation.
Improves the accuracy and user experience of SQL server indexes, optimizes index sorting efficiency, and reduces the possibility of unmatched files.
Smart Images

Figure CN114780536B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of SQL Server databases, and in particular to a method, device, electronic device, and storage medium for creating an index for a SQL Server database. Background Art
[0002] With the development of electronic information, the way of storing data has gradually changed to electronic data storage. In a database with a large amount of data, searching for specific data usually adopts the index method.
[0003] In the related art, SQL servers are usually pre-set with index databases, each of which is configured with index tables, each index table's index corresponds to a corresponding file, and all indexes are associated to generate a search tree. Users enter keywords in SQL software through computers, and the SQL server selects indexes matching the keywords in the search tree. The SQL server queries the corresponding file based on the file address corresponding to the index, and sends the file to the user, so that the user can quickly obtain the required file.
[0004] In the process of implementing this application, the inventor found that there are at least the following problems in this technology:
[0005] When the technical staff updates the index in the index database, the index will be fragmented after the update, so that the keywords entered by the user cannot match the corresponding files, resulting in a poor user experience. Summary of the invention
[0006] In order to improve the problem that fragmented indexes may cause users to be unable to query matching files, the present application provides a method, device, electronic device, and storage medium for creating a SQL Server database index.
[0007] In a first aspect, the present application provides a method for creating a SQL Server database index, using the following technical solution:
[0008] A method for creating a SQL Server database index includes the following steps:
[0009] In a preset index database, regularly obtain change information in all index tables, wherein the change information includes the index to be detected and the change condition field;
[0010] Based on the index to be detected, executing a preset query instruction;
[0011] If the index to be detected cannot match the corresponding file, the change condition field is processed according to the preset change model to obtain the data update index;
[0012] According to the data update index, the preset search tree is updated to obtain node update information;
[0013] The node update information is sent to the user periodically.
[0014] By adopting the above technical solution, the SQL server periodically obtains the change information in the index database and executes the query instruction for the index to be detected corresponding to the change information. When the index to be detected cannot match the corresponding file, the change condition field in the index to be detected is processed to obtain the data update index, and the corresponding search tree is updated to obtain and send the node update information to the user. The SQL server can detect the updated index (i.e., the index to be detected), process the index that cannot be linked to the corresponding file, and update the search tree where the index is located, which can effectively reduce the existence of unlinkable indexes in the search tree, that is, reduce the possibility that the user input keyword cannot match the file, effectively improve the accuracy of the SQL server index, and at the same time, improve the user experience.
[0015] Optionally, the step of processing the change condition field according to a preset change model to obtain a data update index comprises the following steps:
[0016] Get the byte amount and fragment amount of the change condition field;
[0017] Obtaining an index fragmentation rate according to the byte amount and the fragment amount;
[0018] When the index fragmentation rate matches a preset reorganization interval, the change condition field is reorganized to obtain a data update index;
[0019] When the index fragmentation rate matches a preset reconstruction interval, the change condition field is reconstructed to obtain a data update index.
[0020] By adopting the above technical solution, the SQL server determines whether the index to be detected needs to be reorganized or rebuilt according to the fragmentation rate of the index to be detected. Since reconstruction requires additional storage space and consumes a long time, the SQL server reorganizes the fragments with lower fragmentation rates according to different reorganization intervals and reconstruction intervals, effectively improving the efficiency of SQL server index arrangement.
[0021] Optionally, the reorganizing the change condition field to obtain the data update index includes the following steps:
[0022] Get the lock node in the change condition field;
[0023] Delete the lock node in the change condition field to obtain the update condition field;
[0024] According to the update condition field, the index to be detected is updated to obtain a data update index.
[0025] By adopting the above technical solution, there will be a lock node in the reorganized file, and the lock node can be a node that blocks the SQL server when indexing. The SQL server deletes the lock node in the change condition field to obtain the update condition field, and then obtains the reorganized data update index, so that the SQL server can query the corresponding file according to the data update index.
[0026] Optionally, the step of reconstructing the change condition field to obtain a data update index includes the following steps:
[0027] Create a shadow index in the preset shadow index storage space according to the change condition field of the index to be detected;
[0028] According to the shadow index and the corresponding shadow index entry address, the index to be detected is updated to obtain a data update index.
[0029] By adopting the above technical solution, for indexes with high fragmentation rates, the server pre-sets an idle storage space (i.e., shadow index storage space), and for indexes that need to be rebuilt, creates a new index (i.e., shadow index) in the idle storage space, and replaces the index to be detected with the shadow index to obtain a data update index. The rebuilt data update index can be obtained, so that the SQL server can query the corresponding file according to the data update index.
[0030] Optionally, updating the preset search tree according to the data update index to obtain the node update information includes the following steps:
[0031] Obtaining the node weight of the data update index in a preset search tree;
[0032] According to the preset weight comparison table, determine the node type corresponding to the data update index;
[0033] Based on the preset link corresponding to the data update index and the node type, the preset search tree is updated to obtain node update information.
[0034] By adopting the above technical solution, the SQL server obtains the node weight of the data update index in the search tree, and determines the node type of the data update index according to the weight comparison table. Since the other indexes associated with indexes of different node types are inconsistent, it is necessary to determine whether the associated index needs to be added to the node update information for each different index. When the index to be detected needs to be rebuilt or reorganized, the SQL server can add the other index information associated with the index to be detected to the node update information, so that the technicians can maintain and organize the other index information.
[0035] Optionally, after the preset search tree is updated based on the preset link and node type corresponding to the data update index to obtain the node update information, the following steps are further included:
[0036] When the node type of the data update index is a root node, a target root node corresponding to the data update index is selected in a preset search tree;
[0037] Obtain each target leaf node according to the link of the target root node;
[0038] Obtaining the usage frequency of each of the target leaf nodes;
[0039] Generate a leaf node activity table based on the preset activity order and the usage frequency of each target leaf node;
[0040] The leaf node active table is added to the node update information.
[0041] By adopting the above technical solution, when the node type of the data update index is a root node, the root node will be associated with the corresponding leaf node. The SQL server obtains the leaf nodes with higher activity in the root node based on the usage frequency of each leaf node, that is, generates a leaf node activity table. The SQL server adds the leaf node activity table to the node update information so that the technicians can process the more active leaf nodes first.
[0042] Optionally, if the index to be detected cannot match the corresponding file, the change condition field is processed according to a preset change model to obtain a data update index, including the following steps:
[0043] Get the start time of the index to be detected;
[0044] According to the preset current time and start time, the query time interval is obtained;
[0045] If the query time interval exceeds a preset file matching threshold, the change condition field is processed according to a preset change model to obtain a data update index.
[0046] By adopting the above technical solution, the SQL server matches the index to be detected with the corresponding file. During the query process, if the SQL server recognizes that the query time interval exceeds the preset file matching threshold, then the index to be detected is reduced, which reduces the SQL server's query time too long and leads to low efficiency in sorting out the index to be detected.
[0047] In a second aspect, the present application provides a device for creating a SQL Server database index, which adopts the following technical solution:
[0048] A device for creating a SQL Server database index, comprising:
[0049] A first acquisition module is used to periodically acquire change information in all index tables in a preset index database, wherein the change information includes an index to be detected and a change condition field;
[0050] An execution module, used for executing a preset query instruction based on the index to be detected;
[0051] The first obtaining module is used to process the change condition field according to a preset change model to obtain a data update index when the index to be detected cannot match the corresponding file;
[0052] The second obtaining module is used to update the index according to the data, update the preset search tree, and obtain node update information;
[0053] The sending module is used to send the node update information to the user.
[0054] By adopting the above technical solution, the SQL server can detect the updated index (i.e., the index to be detected), process the index that cannot be linked to the corresponding file, and update the search tree where the index is located, which can effectively reduce the number of unlinkable indexes in the search tree, that is, reduce the possibility that the user input keyword cannot match the file, effectively improve the accuracy of the SQL server index, and at the same time, improve the user experience.
[0055] In a third aspect, the present application provides an electronic device, which adopts the following technical solution:
[0056] Optionally, the electronic device includes a processor and a memory, the memory storing at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement a method for creating a SQL Server database index as described in the first aspect.
[0057] By adopting the above technical solution, an electronic device can implement the above-mentioned method of creating a SQL Server database index according to the relevant computer program stored in the memory, thereby improving the collaboration between information from different sources when updating the fragmented index, thereby improving the index accuracy.
[0058] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution:
[0059] Optionally, the storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement a method for creating a SQL Server database index as described in the first aspect.
[0060] By adopting the above technical solution, the corresponding program can be stored, thereby improving the collaboration between information from different sources when updating the fragmented index, thereby improving the index accuracy.
[0061] In summary, the present application includes at least one of the following beneficial technical effects:
[0062] The SQL server can detect the updated index (i.e. the index to be detected), process the index that cannot be linked to the corresponding file, and update the search tree where the index is located, which can effectively reduce the number of unlinkable indexes in the search tree, that is, reduce the possibility that the user input keyword cannot match the file, effectively improve the accuracy of the SQL server index, and at the same time, improve the user experience;
[0063] SQL Server determines whether to reorganize or rebuild the index to be detected based on its fragmentation rate. Since reconstruction requires additional storage space and takes a long time, SQL Server reorganizes fragments with lower fragmentation rates based on different reorganization intervals and reconstruction intervals, effectively improving the efficiency of SQL Server index arrangement;
[0064] There will be lock nodes in the reorganized file, which may be nodes that block the SQL server when indexing. The SQL server deletes the lock nodes in the change condition field to obtain the update condition field, and then obtains the reorganized data update index, so that the SQL server can query the corresponding file according to the data update index. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0066] Figure 1 It is a structural block diagram of a device for creating a SQL Server database index according to an embodiment of the present application.
[0067] Figure 2 It is a flowchart of a method for creating a SQL Server database index according to an embodiment of the present application.
[0068] Figure 3 It is a flow chart of a device for creating a SQL Server database index according to an embodiment of the present application. DETAILED DESCRIPTION
[0069] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0070] The embodiment of the present application provides a method for creating a SQL Server database index, which can be applied to a device for creating a SQL Server database index. The framework structure of the device for creating a SQL Server database index can be as follows: Figure 1 As shown, it may include a SQL server and multiple user terminals, and the user terminal may be a computer or a mobile phone. Specifically, the execution subject of the method may be a SQL server, and it may be assisted by a user terminal. The SQL server changes the index according to the change condition field of a certain index sent by a certain user, and the SQL server detects the changed index, and sends the node update information of the reorganized or rebuilt index to the user. Specifically, the technician sends the change condition field of a certain index to the SQL server through the user terminal, and the SQL server replaces the corresponding field when receiving the change condition field of the index. The SQL server regularly obtains the changed indexes and detects these indexes, and sends the node update information of the reorganized or rebuilt indexes to each user terminal, so that the technician can obtain the changes in the index database through the user terminal.
[0071] The following will be combined with specific implementation methods. Figure 2 The processing flow shown is described in detail, and the content can be as follows:
[0072] Step 201 : periodically obtain change information in all index tables in a preset index database, where the change information includes the index to be detected and the change condition field.
[0073] In the embodiment, the SQL server is pre-set with an index database, each index database stores index tables in a logical order, and each index table corresponds to a different index. SQL periodically obtains change information in all index tables in the index database, and the change information includes a certain changed index (i.e., the index to be detected) and a change condition field. The period can be one hour, one day, or one week.
[0074] Step 202: Execute a preset query instruction based on the index to be detected.
[0075] In an embodiment, the SQL server is pre-set with a query instruction, and the query instruction can be used by the SQL server to query whether there is a corresponding file for a certain index. The SQL server inputs the index to be detected into the input box of the query instruction and executes the preset query instruction.
[0076] Step 203: If the index to be detected cannot match the corresponding file, the change condition field is processed according to the preset change model to obtain a data update index.
[0077] In an embodiment, the SQL server is pre-set with a change model, and the change model is used to process the index to be detected so that the index to be detected can specify the corresponding file. If the SQL server recognizes that the index to be detected cannot match the corresponding file, the change condition field of the index to be detected is processed according to the change model to obtain a processed index (i.e., a data update index).
[0078] Optionally, the byte amount and the fragment amount of the change condition field are obtained, and the index fragmentation rate is obtained according to the byte amount and the fragment amount. When the index fragmentation rate matches a preset reorganization interval, the change condition field is reorganized to obtain a data update index. When the index fragmentation rate matches a preset reconstruction interval, the change condition field is reconstructed to obtain a data update index.
[0079] In an embodiment, the SQL server obtains the byte amount and fragment amount of all change condition fields of the index to be detected, and obtains the index fragmentation rate according to the byte amount and fragment amount of the index to be detected. Wherein, index fragmentation rate = fragmentation amount / byte amount. The SQL server pre-sets a reorganization interval and a reconstruction interval, the reorganization interval can be 5-30%, and the reconstruction interval can be more than 30%. When the index fragmentation rate matches the preset reorganization interval, the change condition field is reorganized to obtain a reorganized index (i.e., a data update index). When the index fragmentation rate matches the preset reconstruction interval, the change condition field is reconstructed to obtain a reconstructed index (i.e., a data update index).
[0080] Optionally, the change condition field is reorganized to obtain a data update index, and the specific steps are as follows: obtain a lock node in the change condition field, delete the lock node in the change condition field, and obtain an update condition field. According to the update condition field, update the index to be detected to obtain a data update index.
[0081] In an embodiment, when the SQL server identifies that the index fragmentation rate of the index to be detected is in the reorganization interval, the SQL server obtains the lock node in the change condition field, and the lock node is a node that causes blockage in the SQL server when indexing, such as garbled characters, spaces, or spacing characters. The SQL server deletes the lock node in the change condition field to obtain the update condition field. According to the update condition field, the SQL server replaces the original condition field of the index to be detected with the update condition field, that is, updates the index to be detected to obtain a data update index.
[0082] Optionally, the change condition field is rebuilt to obtain a data update index. The specific steps are as follows: according to the change condition field of the index to be detected, a shadow index is created in a preset shadow index storage space. According to the shadow index and the corresponding shadow index entry address, the index to be detected is updated to obtain a data update index.
[0083] In an embodiment, when the SQL server identifies that the index fragmentation rate of the index to be detected is in the reconstruction interval, the SQL server pre-sets a shadow index storage space, and the shadow index storage space is used to re-store the new index so that the SQL server can replace the old index with the new index. The SQL server can obtain the new index through the Internet or user upload. The SQL server creates a new index (i.e., a shadow index) in the shadow index storage space according to the change condition field of the index to be detected. The SQL server replaces the index to be detected with the shadow index based on the shadow index and the corresponding shadow index entry address, and replaces the entry address of the index to be detected with the shadow index entry address, that is, updates the index to be detected to obtain a data update index.
[0084] Optionally, the start time of the index to be detected is obtained, and the query time interval is obtained according to the preset current time and the start time. If the query time interval exceeds the preset file matching threshold, the change condition field is processed according to the preset change model to obtain the data update index.
[0085] In an embodiment, the SQL server obtains the start time of the index to be detected when executing the query instruction, and obtains the query time interval according to the preset current time and the start time. The SQL server pre-sets a file matching threshold, which can be 1ms, 5ms, or 1s. If the SQL server recognizes that the query time interval exceeds the file matching threshold, the change condition field is processed according to the preset change model to obtain the data update index.
[0086] Step 204: Update the preset search tree according to the data update index to obtain node update information.
[0087] In an embodiment, the SQL server pre-sets a search tree, which may be a tree data link associated with all index tables. The SQL server updates the index according to the data, updates the preset search tree, and obtains update information of a certain index (ie, node update information).
[0088] Optionally, a node weight of the data update index in a preset search tree is obtained. A node type corresponding to the data update index is determined according to a preset weight comparison table. Based on the preset link and node type corresponding to the data update index, the preset search tree is updated to obtain node update information.
[0089] In an embodiment, the SQL server is pre-set with a weight comparison table, the weight may be the number of all nodes of the downlink of a certain node in the search tree, and the weight comparison table may be a statistical table of the number of all nodes of the downlink corresponding to each node. The SQL server obtains the node weight of the data update index in the preset search tree, and determines the node type corresponding to the data update index according to the weight comparison table, and the node type can be divided into a root node and a leaf node. The SQL server updates the preset search tree based on the link and node type corresponding to the data update index to obtain the node update information.
[0090] Optionally, when the node type of the data update index is a root node, select the target root node corresponding to the data update index in the preset search tree. According to the link of the target root node, obtain each target leaf node. Obtain the usage frequency of each target leaf node, and generate a leaf node activity table according to the preset activity order and the usage frequency of each target leaf node. Add the leaf node activity table to the node update information.
[0091] In an embodiment, after the SQL server obtains the node update information, when the node type of the data update index is a root node, the root node (i.e., the target root node) corresponding to the data update index is selected in the preset search tree. The SQL server obtains all leaf nodes (i.e., target leaf nodes) in the link based on the link of the target root node. The SQL server obtains the usage frequency of each target leaf node, and generates a leaf node activity table based on the preset activity order and the usage frequency of each target leaf node. The SQL server adds the leaf node activity table to the node update information so that the technician can prioritize the arrangement or maintenance of the more active leaf nodes.
[0092] Step 205: Periodically send node update information to the user.
[0093] In an embodiment, the SQL server sends node update information to the user periodically, which may be one hour, one day, or one week.
[0094] Based on the same technical concept, the embodiment of the present application also discloses a device for creating an index for a SQL Server database. The device for creating an index for a SQL Server database includes a SQL server, such as Figure 3 As shown, the SQL server includes:
[0095] A first acquisition module is used to periodically acquire change information in all index tables in a preset index database, where the change information includes an index to be detected and a change condition field;
[0096] An execution module, used for executing a preset query instruction based on the index to be detected;
[0097] The first obtaining module is used to process the change condition field according to a preset change model to obtain a data update index when the index to be detected cannot match the corresponding file;
[0098] The second obtaining module is used to update the index according to the data, update the preset search tree, and obtain the node update information;
[0099] The sending module is used to periodically send node update information to users.
[0100] Optionally, a second acquisition module is used to acquire the byte amount and fragment amount of the change condition field;
[0101] The third obtaining module is used to obtain the index fragmentation rate according to the byte amount and the fragment amount;
[0102] The fourth obtaining module is used to reorganize the change condition field to obtain the data update index when the index fragmentation rate matches the preset reorganization interval;
[0103] The fifth obtaining module is used to reconstruct the change condition field to obtain the data update index when the index fragmentation rate matches the preset reconstruction interval.
[0104] Optionally, a third acquisition module is used to acquire a lock node in the change condition field;
[0105] The sixth obtaining module is used to delete the lock node in the change condition field to obtain the update condition field;
[0106] The first updating module is used to update the to-be-detected index according to the update condition field to obtain a data update index.
[0107] Optionally, a creation module is used to create a shadow index in a preset shadow index storage space according to the change condition field of the index to be detected.
[0108] Optionally, a second update module is used to update the index to be detected according to the shadow index and the corresponding shadow index entry address to obtain a data update index.
[0109] Optionally, a fourth acquisition module is used to obtain the node weight of the data update index in a preset search tree;
[0110] A determination module, used to determine the node type corresponding to the data update index according to a preset weight comparison table;
[0111] The seventh obtaining module is used to update the preset search tree based on the preset link and node type corresponding to the data update index to obtain node update information.
[0112] Optionally, a selection module is used to select a target root node corresponding to the data update index in a preset search tree when the node type of the data update index is a root node;
[0113] An eighth obtaining module, used to obtain each target root node according to the link of the target leaf node;
[0114] A fifth acquisition module, used to acquire the usage frequency of each target leaf node;
[0115] A generation module, used to generate a leaf node activity table according to a preset activity order and a usage frequency of each target leaf node;
[0116] Add a module to add the leaf node activity table to the node update information.
[0117] Optionally, a sixth acquisition module is used to obtain the start time of the index to be detected;
[0118] The ninth obtaining module is used to obtain the query time interval according to the preset current time and start time;
[0119] The first obtaining module is also used to process the change condition field according to a preset change model to obtain a data update index when the query time interval exceeds a preset file matching threshold.
[0120] An embodiment of the present application further discloses an electronic device, including a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executes a method for creating a SQL Server database index as described above.
[0121] An embodiment of the present application also discloses a computer-readable storage medium, which stores a computer program that can be loaded by a processor and execute a method for creating a SQL Server database index as described above. The computer-readable storage medium includes, for example: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0122] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit the protection scope of the application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on these embodiments, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
Claims
1. A method for creating a SQL Server database index, characterized in that: The following steps are involved: In a preset index database, regularly obtain change information in all index tables, wherein the change information includes the index to be detected and the change condition field; Based on the index to be detected, executing a preset query instruction; If the index to be detected cannot match the corresponding file, the change condition field is processed according to the preset change model to obtain the data update index; According to the data update index, the preset search tree is updated to obtain node update information; Periodically sending the node update information to the user; The step of processing the change condition field according to the preset change model to obtain a data update index comprises the following steps: Get the byte amount and fragment amount of the change condition field; Obtaining an index fragmentation rate according to the byte amount and the fragment amount; When the index fragmentation rate matches a preset reorganization interval, the change condition field is reorganized to obtain a data update index; When the index fragmentation rate matches a preset reconstruction interval, the change condition field is reconstructed to obtain a data update index.
2. A method for creating a SQL Server database index according to claim 1, characterized in that: Reorganize the change condition fields to obtain the data update index, including the following steps: Get the lock node in the change condition field; Delete the lock node in the change condition field to obtain the update condition field; According to the update condition field, the index to be detected is updated to obtain a data update index.
3. A method for creating a SQL Server database index according to claim 1, characterized in that: Rebuilding the change condition field to obtain the data update index includes the following steps: Create a shadow index in the preset shadow index storage space according to the change condition field of the index to be detected; According to the shadow index and the corresponding shadow index entry address, the index to be detected is updated to obtain a data update index.
4. A method for creating a SQL Server database index according to claim 1, characterized in that: According to the data update index, the preset search tree is updated to obtain the node update information, including the following steps: Obtaining the node weight of the data update index in a preset search tree; According to the preset weight comparison table, determine the node type corresponding to the data update index; Based on the preset link corresponding to the data update index and the node type, the preset search tree is updated to obtain node update information.
5. A method for creating a SQL Server database index according to claim 4, characterized in that: After the preset search tree is updated based on the preset link and node type corresponding to the data update index to obtain the node update information, the following steps are also included: When the node type of the data update index is a root node, a target root node corresponding to the data update index is selected in a preset search tree; Obtain each target leaf node according to the link of the target root node; Obtaining the usage frequency of each of the target leaf nodes; Generate a leaf node activity table based on the preset activity order and the usage frequency of each target leaf node; The leaf node active table is added to the node update information.
6. A method for creating a SQL Server database index according to claim 1, characterized in that: If the index to be detected cannot match the corresponding file, the change condition field is processed according to the preset change model to obtain the data update index, including the following steps: Get the start time of the index to be detected; According to the preset current time and start time, the query time interval is obtained; If the query time interval exceeds a preset file matching threshold, the change condition field is processed according to a preset change model to obtain a data update index.
7. A device for creating an index for a SQL Server database, characterized in that: include: A first acquisition module is used to periodically acquire change information in all index tables in a preset index database, wherein the change information includes an index to be detected and a change condition field; An execution module, used for executing a preset query instruction based on the index to be detected; The first obtaining module is used to process the change condition field according to a preset change model to obtain a data update index when the index to be detected cannot match the corresponding file; The second obtaining module is used to update the index according to the data, update the preset search tree, and obtain node update information; A sending module, used for regularly sending the node update information to the user; The step of processing the change condition field according to the preset change model to obtain a data update index comprises the following steps: Get the byte amount and fragment amount of the change condition field; Obtaining an index fragmentation rate according to the byte amount and the fragment amount; When the index fragmentation rate matches a preset reorganization interval, the change condition field is reorganized to obtain a data update index; When the index fragmentation rate matches a preset reconstruction interval, the change condition field is reconstructed to obtain a data update index.
8. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program which can be loaded by the processor and executes the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: A computer program is stored which can be loaded by a processor and execute the method according to any one of claims 1 to 6.
