Information processing method and device, electronic equipment, storage medium and program product

By setting syntax control parameters for the update threshold for the database data table, statistical information updates are automatically triggered, which solves the problem of lagging database statistical information updates, and improves query optimization efficiency and system response speed.

CN119938680APending Publication Date: 2025-05-06CETC JINCANG (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411982541.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The prior art has lagged statistical information updates in the database, resulting in the query optimizer being unable to make the best decision based on the latest data information, affecting query performance and system response speed.

Method used

By adding syntax control parameters to the data table based on the properties of the data table and the properties of the database, setting an update threshold. When the number of rows updated in the data table reaches the threshold, the statistical information will be automatically updated.

Benefits of technology

It realizes timely update of statistical information, avoids the inaccurate execution plan and performance degradation caused by untimely updates, and improves the efficiency of query optimization and system response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938680A_ABST
    Figure CN119938680A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an information processing method and device, electronic equipment, a storage medium and a program product, and the method comprises the steps: adding grammar control parameters for a data table according to the attributes of the data table in a database and the attributes of the database, so as to set an update threshold value of the data table; the attribute of the data table comprises the data size of the data table and the priority of the service corresponding to the data table, the attribute of the database comprises the load capacity of the database, and when the updated line number of the data table reaches an updating threshold value, the statistical information of the data table is updated. According to the scheme, the statistical information can be automatically updated based on the updating threshold value of the data table, it is ensured that the statistical information is updated in time, and then the query optimization efficiency and the system response speed are improved. And the updating threshold value is determined based on the attribute of the data table and the database, so that the updating threshold value can be set more flexibly, unnecessary updating is reduced, the use of system resources is optimized, and the overall performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of databases, and in particular to an information processing method, device, electronic device, storage medium and program product. Background Art

[0002] In a database management system, statistical information is the meta-information about the distribution and characteristics of data in the database. Statistical information can include the number of columns in a table, the cardinality of columns, index information, etc. Add, delete, and modify operations in a database will change the data in the table, thus affecting the statistical information. For example, inserting new data will increase the number of rows, deleting data will reduce the number of rows, and updating data may change the number of pages.

[0003] Therefore, the addition, deletion and modification operations of the database require the updating of statistical information. The lag of statistical information will cause the query optimizer to be unable to make the best optimization decision based on the latest data information, thus affecting query performance and system response speed.

[0004] Currently, statistical information is mainly updated manually or periodically. However, as the amount of data increases, the manual or periodic updating of statistical information cannot meet the rapid and large-scale data changes, resulting in a delay in the updating of statistical information. Summary of the invention

[0005] Embodiments of the present application provide an information processing method, an apparatus, an electronic device, a storage medium, and a program product for timely updating statistical information.

[0006] In a first aspect, an embodiment of the present application provides an information processing method, including:

[0007] According to the attributes of the data table in the database and the attributes of the database, a grammatical control parameter is added to the data table, wherein the grammatical control parameter is used to set an update threshold of the data table; the attributes of the data table include the amount of data in the data table and the priority of the service corresponding to the data table, and the attributes of the database include the load of the database;

[0008] When the number of updated rows in the data table reaches the update threshold, the statistical information of the data table is updated.

[0009] In a possible implementation manner, adding a grammar control parameter to the data table according to the attribute of the data table in the database and the attribute of the database includes:

[0010] In the process of creating a data table in a database, grammar control parameters are added to the data table according to the properties of the data table in the database and the properties of the database.

[0011] In a possible implementation, adding a grammar control parameter to the data table according to the attribute of the data table in the database and the attribute of the database includes:

[0012] Determine an update threshold of the data table according to the first update threshold, the second update threshold and the third update threshold, and add a grammar control parameter to the data table;

[0013] The first update threshold is positively correlated with the amount of data in the data table, the second update threshold is negatively correlated with the priority of the business corresponding to the data table, and the third update threshold is positively correlated with the load of the database.

[0014] In a possible implementation, the method further includes:

[0015] When performing a change operation on the data table, adjusting the update threshold according to the change characteristics of the change operation;

[0016] and / or,

[0017] After the statistical information of the data table is updated, the update threshold is adjusted according to the historical data growth characteristics, the historical query frequency and the historical data change characteristics.

[0018] In a possible implementation manner, the change characteristics of the change operation include adding, deleting or modifying;

[0019] The change characteristics of the change operation include reducing the update threshold when adding or modifying, and maintaining or increasing the update threshold when deleting; or, the change characteristics of the change operation include maintaining or reducing the update threshold when adding or modifying, and increasing the update threshold when deleting;

[0020] The historical data growth characteristic includes the amount of growth data within a preset time, the historical query frequency includes the number of queries within the preset time, and the historical data change characteristic includes the number of addition operations, deletion operations, and modification operations within the preset time;

[0021] The growth data volume, the query times, the addition operation times, the deletion operation times and the modification operation times are positively correlated with the adjusted update threshold.

[0022] In a possible implementation, the data table includes a sub-table and / or an inheritance table in a partition table, and the data table has a corresponding root table;

[0023] When the number of rows updated in the data table reaches the update threshold, updating the statistical information of the data table includes:

[0024] Monitor update operations of the data table and a root table corresponding to the data table, and record the number of rows of update operations corresponding to the data table and the number of rows of update operations corresponding to the root table;

[0025] When the number of rows corresponding to the update operation corresponding to the root table reaches the update threshold, the statistical information of the data table and the statistical information of the root table are updated;

[0026] When the number of rows corresponding to the update operation corresponding to the data table reaches the update threshold, the statistical information of the data table is updated.

[0027] In a second aspect, the present application provides a data processing device, the device comprising:

[0028] A setting module, used for adding grammatical control parameters to the data table according to the attributes of the data table in the database and the attributes of the database, wherein the grammatical control parameters are used to set the update threshold of the data table; the attributes of the data table include the amount of data in the data table and the priority of the business corresponding to the data table, and the attributes of the database include the load of the database;

[0029] The update module is used to update the statistical information of the data table when the number of updated rows of the data table reaches the update threshold.

[0030] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor;

[0031] The memory stores computer-executable instructions;

[0032] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.

[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.

[0034] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.

[0035] The information processing method, device, electronic device, storage medium and program product provided by the embodiments of the present application add syntax control parameters to the data table according to the attributes of the data table and the attributes of the database. The syntax control parameters are used to set the update threshold of the data table. The attributes of the data table include the amount of data in the data table and the priority of the business corresponding to the data table. The attributes of the database include the load of the database. When the number of rows updated in the data table reaches the update threshold, the statistical information of the data table is updated. The scheme of the present application can automatically trigger the analysis operation based on the update threshold of the data table, realize automatic update of statistical information, ensure timely update of statistical information, avoid the problem of inaccurate execution plan and performance degradation due to untimely update of statistical information, and thus improve the efficiency of query optimization and system response speed. And because the update threshold is determined based on the attributes of the data table and the attributes of the database, it is possible to set the update threshold more flexibly, reduce unnecessary updates, optimize the use of system resources, and improve overall performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0037] Figure 1 Schematic diagram of the information processing method provided for this application Figure 1 ;

[0038] Figure 2 Schematic diagram of the information processing method provided for this application Figure 2

[0039] Figure 3 A schematic diagram of the structure of the information processing device provided by this application;

[0040] Figure 4 A schematic diagram of the structure of the electronic device provided in this application.

[0041] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0042] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0043] Currently, statistical information is mainly updated manually or periodically, which will cause a lag in statistical information updates and affect query performance and system response speed.

[0044] In some embodiments, the statistical information can be updated based on the update threshold, but considering that a large update threshold will cause a delay in updating the statistical information, and a small update threshold will lead to frequent updates, which will consume a large amount of processor (Central Processing Unit, CPU), memory and input / output (I / O) resources, resulting in a decrease in system performance. Therefore, how to set the update threshold is particularly important.

[0045] To this end, the present application proposes an information processing method, which adds syntax control parameters to the data table according to the attributes of the data table and the attributes of the database. The syntax control parameters are used to set the update threshold of the data table. The update threshold can be set more flexibly, unnecessary updates can be reduced, the use of system resources can be optimized, and the overall performance can be improved.

[0046] The embodiment of the present application provides a scenario illustration of an information processing method, in which the electronic device adds a syntax control parameter to the data table according to the attributes of the data table in the database and the attributes of the database to set the update threshold of the data table. The electronic device can also monitor the addition, deletion and modification operations of the data table, and update the statistical information of the data table when the number of rows updated in the data table reaches the update threshold.

[0047] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0048] Figure 1 Schematic diagram of the information processing method provided for this application Figure 1 ,like Figure 1 As shown, with the electronic device as the execution subject, the method includes:

[0049] S101. Adding grammatical control parameters to a data table according to the attributes of the data table in the database and the attributes of the database, wherein the grammatical control parameters are used to set an update threshold of the data table.

[0050] The attributes of a data table include the amount of data in the data table and the priority of the business corresponding to the data table; the attributes of a database include the load of the database.

[0051] For example, a control parameter for modifying data growth demand is added to the syntax corresponding to the data table, which is used to set an update threshold of the data table. The update threshold is a condition for triggering update of statistical information.

[0052] In some embodiments, during the process of creating a table in a database, syntax control parameters may be added to the database table according to the properties of the data table in the database and the properties of the database, which may reduce the complexity of subsequent development and maintenance.

[0053] For example, in the process of creating a data table in the database, the with syntax can be used to add syntax control parameters to the data table. Specifically, in the process of writing data into a blank table in the database, the syntax control parameters can be added to the data table.

[0054] In other embodiments, after the data table in the database is created, grammar control parameters may be added to the database table according to the properties of the data table in the database and the properties of the database.

[0055] It should be noted that the data volume of a data table can also be understood as the size of the data table. The data changes in a large table may be relatively large. If inaccurate statistical information has a more significant impact on query performance, a slightly larger update threshold can be set to avoid frequent updates of statistical information on the one hand, and on the other hand, the optimal query strategy can be made immediately based on the update of statistical information. For small tables, the data volume changes relatively little, so a slightly smaller update threshold can be set to avoid slow statistical updates due to excessively large thresholds.

[0056] The services in the database have corresponding priorities. For services with higher priorities, i.e., key services, the corresponding data tables can be set with a slightly smaller update threshold to ensure that the statistical information remains up to date, guarantee the high availability and performance of the system, so as to quickly respond to changes in data distribution and improve the performance of the query optimizer. For example, the update threshold can be set to 10% of the original data volume.

[0057] When the database load is large, frequent updates of statistical information may lead to performance bottlenecks. You can set a larger update threshold to reduce the frequency of statistical updates to avoid affecting system performance. The database load can include query load, write load, read load, etc. Query load refers to the number of query requests within a certain period of time before the update threshold is set, write load refers to the number of write requests within a certain period of time before the update threshold is set, and read load refers to the number of read requests within a certain period of time before the update threshold is set.

[0058] Therefore, by determining the update threshold in consideration of the above factors, it is possible to ensure that the statistical information is updated in a timely manner while reducing unnecessary frequent updates of the statistical information.

[0059] In some examples, the update threshold of the data table is determined according to the first update threshold, the second update threshold and the third update threshold, and a grammatical control parameter is added to the data table, the first update threshold is positively correlated with the amount of data in the data table, the second update threshold is negatively correlated with the priority of the business corresponding to the data table, and the third update threshold is positively correlated with the load of the database. Based on this, the threshold can be set more flexibly to meet different needs.

[0060] For example, corresponding weights may be assigned to the first update threshold, the second update threshold, and the third update threshold according to actual conditions, and the update threshold of the data table may be determined based on the three update thresholds and the corresponding weights.

[0061] In a possible implementation, the first update threshold includes a first sub-update threshold, a second sub-update threshold or a third sub-update threshold, and the first sub-update threshold is less than the second sub-update threshold and greater than the third sub-update threshold. When the amount of data in the data table is within a preset data amount range, the first update threshold is determined, when the amount of data in the data table is greater than the maximum value of the preset amount range, the second update threshold is determined, and when the amount of data in the preset table is less than the minimum value of the preset data amount range, the third sub-update threshold is determined. The preset data amount range can be set according to actual conditions. The second sub-update threshold can be, for example, 30% of the amount of data in the data table, the third sub-update threshold can be, for example, 10% of the amount of data in the data table, and the first sub-update threshold can be, for example, any value between 10% and 30% of the data table.

[0062] In a possible implementation, the second update threshold includes a fourth sub-update threshold, a fifth sub-update threshold or a sixth sub-update threshold, and the fourth sub-update threshold is greater than the fifth sub-update threshold and less than the sixth sub-update threshold. When the priority of the business corresponding to the data table is within the preset priority range, the fourth sub-update threshold is determined, when the priority of the business corresponding to the data table is higher than the maximum value of the preset priority range, the fifth sub-update threshold is determined, and when the priority of the business corresponding to the data table is lower than the minimum value of the preset priority range, the sixth sub-update threshold is determined. Among them, the preset priority range can be, for example, a priority of an intermediate range, which can be specifically determined according to actual conditions. The sixth sub-update threshold can be, for example, 30% of the data volume of the data table, the fifth sub-update threshold can be, for example, 10% of the data volume of the data table, and the fourth sub-update threshold can be, for example, any value between 10% and 30% of the data table.

[0063] In a possible implementation, the third update threshold includes a seventh sub-update threshold, an eighth sub-update threshold, or a ninth sub-update threshold, and the seventh sub-update threshold is less than the eighth sub-update threshold and greater than the ninth sub-update threshold. When the load of the database is within a preset load range, the seventh sub-update threshold is determined; when the load of the database is less than the minimum value of the preset load range, the eighth sub-update threshold is determined; when the load of the database is greater than the maximum value of the preset load range, the ninth sub-update threshold is determined. The preset load range can be determined based on the load of the database within a certain period of time before the update threshold is set, or it can be determined based on other circumstances. The eighth sub-update threshold can be, for example, 50% of the data volume of the data table, the ninth sub-update threshold can be, for example, 10% of the data volume of the data table, and the seventh sub-update threshold can be, for example, any value between 10% and 50% of the data table.

[0064] S102: When the number of updated rows in the data table reaches an update threshold, the statistical information of the data table is updated.

[0065] For example, the update operation on the data table can be dynamically monitored. When the update operation on the data table is monitored, the number of rows corresponding to the update operation is recorded. When the number of rows corresponding to the update operation reaches the update threshold, the statistical information of the data table is updated to ensure that the update operation is performed in time. After the statistical information of the data table is updated, the number of rows corresponding to the update operation is recalculated so that the next update of the statistical information can be performed.

[0066] For example, the update operation may include any operation of the add, delete, and modify operation, the merge operation, the copy operation, and the insert operation. The add, delete, and modify operation includes the add operation, the delete operation, and the modify operation.

[0067] The add operation is used to insert new records into a data table. It can be a single insert or multiple records can be inserted at once using the multi-row insert syntax. The delete operation is used to delete records from a data table. It can delete specific records based on specific conditions or delete all records when there are no conditions. The modify operation is used to modify the values ​​of existing records in a table. The merge operation is used to merge data from other tables into a data table based on conditions. The copy operation is used to import data from a file into a data table in batches. The insert operation is used to insert data from a file into a data table in batches. The insert operation can be implemented using the Bulk Load plug-in.

[0068] In this step, the analysis operation can be automatically triggered based on the update threshold of the data table to automatically update the statistical information, ensure that the statistical information is updated in a timely manner, avoid inaccurate execution plans and performance degradation due to untimely statistical information updates, and thus improve the efficiency of query optimization and system response speed.

[0069] In some embodiments, the data table includes a sub-table and / or an inheritance table in a partition table. The sub-table and the inheritance table in the partition table have a corresponding root table, which can also be understood as a parent table or a main table.

[0070] When the data table includes a sub-table in a partitioned table, the update operations of the sub-table and the root table corresponding to the sub-table are monitored, and the number of rows of the update operations corresponding to the sub-table and the number of rows of the update operations corresponding to the root table corresponding to the sub-table are recorded; when the number of rows corresponding to the update operations corresponding to the root table corresponding to the sub-table reaches an update threshold, the statistical information of the sub-table and the statistical information of the root table corresponding to the sub-table are updated; when the number of rows corresponding to the update operations corresponding to the sub-table reaches the update threshold, the statistical information of the sub-table is updated.

[0071] When the data table includes an inheritance table, the update operations of the inheritance table and the root table corresponding to the inheritance table are monitored, and the number of rows corresponding to the update operations of the inheritance table and the number of rows corresponding to the update operations of the root table corresponding to the inheritance table are recorded; when the number of rows corresponding to the update operations of the root table corresponding to the inheritance table reaches the update threshold, the statistical information of the inheritance table and the statistical information of the root table corresponding to the inheritance table are updated; when the number of rows corresponding to the update operations of the inheritance table reaches the update threshold, the statistical information of the inheritance table is updated.

[0072] Based on this, it can be ensured that the statistical information of the root table can be updated in time. Considering that the statistical information of the root table plays an important role in the query optimization and performance management of the partition table or inheritance table, by updating the statistical information of the root table, it can be ensured that the database system's overall understanding of the partition table or inheritance table is up to date, thereby improving query performance and system efficiency.

[0073] In other embodiments, the data table includes a normal table and / or a temporary table. The normal table and the temporary table do not have a corresponding root table. Only the update operations of the normal table or the temporary table can be monitored. When the number of rows corresponding to the update operation reaches an update threshold, the statistical information of the data table is updated.

[0074] In some embodiments, there may be multiple data tables, each having a corresponding update threshold. When multiple data tables are changed at the same time, some data tables may reach the corresponding update threshold while some data tables may not reach the corresponding update threshold. Therefore, the change operation of each table can be monitored, and the statistical information of the data tables that reach the update threshold can be automatically updated at the same time.

[0075] The data processing method provided by the present application can set update thresholds more flexibly, reduce unnecessary updates, optimize the use of system resources, and improve overall performance. In addition, since threshold parameters are set for a data table during the process of creating a data table, the complexity of subsequent development and maintenance can be reduced.

[0076] Figure 2Schematic diagram of the information processing method provided in the embodiment of the present application Figure 2 ,like Figure 2 As shown, after step S101, the following further includes:

[0077] S103: When a change operation is performed on the data table, an update threshold is adjusted according to the change characteristics of the change operation.

[0078] In this step, when the data table is changed, the update threshold can be adjusted according to the change characteristics of the change operation, so as to adjust the change threshold in real time, so as to cope with different data changes and meet the needs of different scenarios by flexibly adjusting the change threshold.

[0079] It should be noted that, for each change operation, it can be determined whether the update threshold needs to be adjusted according to the actual situation of the change operation. If necessary, the update threshold is adjusted; if not, the update threshold is not adjusted.

[0080] In some embodiments, the change characteristics of the change operation include addition, deletion, and modification. Different types of data changes have different degrees of impact on statistical information. For example, large-scale insertions may require more frequent statistical information updates, while deletion operations may have less impact on statistical information in some cases. By analyzing the nature of data changes, a smaller update threshold is set when inserting data, and a larger threshold can be set for some changes that do not require much statistical information, thereby avoiding performance loss caused by frequent updates of statistical information.

[0081] Therefore, when the change characteristics of the change operation include adding or modifying, the update threshold set in step S101 can be reduced, when the change characteristics of the change operation include deleting, reducing the update threshold, and when the change characteristics of the change operation include deleting, maintaining or increasing the update threshold. Alternatively, when the change characteristics of the change operation include adding or modifying, maintaining or reducing the update threshold, and when the change characteristics of the change operation include deleting, increasing the update threshold.

[0082] In the embodiment of the present application, after step S102, the following may also be included:

[0083] S104: Adjust the update threshold according to the historical data growth characteristics, the historical query frequency, and the historical data change characteristics.

[0084] In some embodiments, the historical data growth characteristic includes the amount of growth data within a preset time, the historical query frequency includes the number of queries within a preset time, the historical data change characteristic includes the number of add operations, the number of delete operations, and the number of modify operations within a preset time, and the database attribute includes the load of the database. The amount of growth data, the number of queries, the number of add operations, the number of delete operations, and the number of modify operations are positively correlated with the adjusted update threshold.

[0085] The preset time may be determined according to actual conditions, and may be the time when the update operation of the statistical information was last triggered, that is, the time interval between the last update of the statistical information and the last update of the statistical information.

[0086] The larger the amount of data growth is, the greater the change in data volume is. You can increase the update threshold to avoid frequent updates of statistical information. The smaller the amount of data growth is, the smaller the change in data volume is. You can reduce the update threshold to ensure timely updates of statistical information.

[0087] Different types of data changes have different impacts on statistics. For example, large-scale insertions may require more frequent statistics updates, while deletions may have less impact on statistics in some cases. By analyzing the nature of data changes, a smaller update threshold can be set when inserting data, and a larger threshold can be set for some changes that do not require much statistics, thereby avoiding performance loss caused by frequent updates of statistics.

[0088] For tables with frequent complex queries, you can set a smaller threshold to ensure that the statistics are always up-to-date, guarantee high availability and performance of the system to quickly respond to changes in data distribution, and improve the performance of the query optimizer.

[0089] Based on this, the threshold can be adjusted in time according to data changes and system feedback, providing more stable and efficient support for large-scale data processing and real-time analysis.

[0090] In a possible implementation manner, the adjusted update threshold is determined according to the fourth update threshold, the fifth update threshold, the sixth update threshold, the seventh update threshold, and the eighth update threshold.

[0091] For example, a corresponding weight may be assigned to each update threshold according to actual conditions, and an adjusted update threshold may be determined based on the five update thresholds and the corresponding weights.

[0092] In a possible implementation, the fourth update threshold includes a tenth sub-update threshold, an eleventh sub-update threshold or a twelfth sub-update threshold, and the tenth sub-update threshold is less than the eleventh sub-update threshold and greater than the twelfth sub-update threshold. When the growth data volume of the data table is within the preset change data volume range, the tenth sub-update threshold is determined; when the data volume of the data table is greater than the maximum value of the preset change data volume range, the eleventh sub-update threshold is determined; when the data growth amount of the data table is less than the minimum value of the preset change data volume range, the twelfth sub-update threshold is determined. The preset change data volume range can be determined according to the data volume of the data table, the eleventh sub-update threshold can be, for example, 30% of the data volume of the data table, the twelfth sub-update threshold can be, for example, 10% of the data volume of the data table, and the tenth sub-update threshold can be, for example, any value between 10% and 30% of the data volume of the data table.

[0093] In a possible implementation, the fifth sub-update threshold includes the thirteenth sub-update threshold, the fourteenth sub-update threshold or the fifteenth sub-update threshold, and the thirteenth sub-update threshold is less than the fourteenth sub-update threshold and greater than the fifteenth sub-update threshold. When the query number is within the preset query number range, the thirteenth sub-update threshold is determined, when the query number is less than the minimum value of the preset query number range, the fourteenth sub-update threshold is determined, and when the query number is greater than the maximum value of the preset query number range, the fifteenth sub-update threshold is determined. The fourteenth sub-update threshold may be, for example, 30% of the data volume of the data table, the fifteenth sub-update threshold may be, for example, 10% of the data volume of the data table, and the thirteenth sub-update threshold may be, for example, 10%-30% of the data volume of the data table.

[0094] The sixth update threshold, the seventh update threshold and the eighth update threshold are similar to the above situations and are not described again here.

[0095] The data processing method provided in the embodiment of the present application adjusts the update threshold in a timely manner to provide more stable and efficient support for large-scale data processing and real-time analysis in response to different data changes.

[0096] Figure 3 A schematic diagram of the structure of the information processing device provided in this application, such as Figure 3 As shown, the information processing device 40 provided in this embodiment includes:

[0097] The setting module 41 is used to add syntax control parameters to the data table according to the attributes of the data table in the database and the attributes of the database, and the syntax control parameters are used to set the update threshold of the data table; the attributes of the data table include the data volume of the data table and the priority of the business corresponding to the data table, and the attributes of the database include the load of the database

[0098] An update module 42 is configured to update the statistical information of the data table when the number of updated rows of the data table reaches the update threshold. In a possible implementation, the attributes of the data table include the amount of data in the data table and the priority of the business corresponding to the data table.

[0099] In a possible implementation manner, the setting module 41 is specifically configured to add syntax control parameters to the data table according to the attributes of the data table in the database and the attributes of the database during the process of creating the data table in the database.

[0100] In one possible implementation, the setting module 41 is specifically used to determine the update threshold of the data table based on the first update threshold, the second update threshold and the third update threshold, and add syntax control parameters to the data table; the first update threshold is positively correlated with the amount of data in the data table, the second update threshold is negatively correlated with the priority of the business corresponding to the data table, and the third update threshold is positively correlated with the load of the database.

[0101] In a possible implementation, it also includes an adjustment module 43, which is used to adjust the update threshold according to the change characteristics of the change operation when the change operation is performed on the data table; and / or, after the statistical information of the data table is updated, adjust the update threshold according to the historical data growth characteristics, historical query frequency, historical data change characteristics and the properties of the database.

[0102] In one possible implementation, the changing characteristics of the change operation include adding, deleting or modifying; the changing characteristics of the change operation include reducing the update threshold when adding or modifying, and maintaining or increasing the update threshold when deleting; or, the changing characteristics of the change operation include maintaining or reducing the update threshold when adding or modifying, and increasing the update threshold when deleting; the historical growth characteristics include the growth data volume within a preset time, the historical query frequency includes the number of queries within the preset time, and the historical data change characteristics include the number of addition operations, the number of deletion operations and the number of modification operations within the preset time; the growth data volume, the number of queries, the number of addition operations, the number of deletion operations and the number of modification operations are positively correlated with the adjusted update threshold.

[0103] In one possible implementation, the data table includes a subtable and / or an inheritance table in a partition table, and the data table has a corresponding root table; an update module 42 is specifically used to monitor update operations of the data table and a root table corresponding to the data table, and record the number of rows corresponding to the update operations of the data table and the number of rows corresponding to the update operations of the root table; when the number of rows corresponding to the update operations corresponding to the root table reaches the update threshold, the statistical information of the data table and the statistical information of the root table are updated; when the number of rows corresponding to the update operations corresponding to the data table reaches the update threshold, the statistical information of the data table is updated.

[0104] The information processing device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be described in detail here.

[0105] Figure 4 This is a schematic diagram of the structure of the electronic device provided in this application. Figure 4 As shown, the electronic device 50 provided in this embodiment includes: at least one processor 501 and a memory 502. Optionally, the device 50 also includes a communication component 503. The processor 501, the memory 502 and the communication component 503 are connected via a bus 504.

[0106] In a specific implementation process, at least one processor 501 executes the computer-executable instructions stored in the memory 502, so that at least one processor 501 executes the above method.

[0107] The specific implementation process of the processor 501 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0108] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0109] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.

[0110] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0111] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.

[0112] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.

[0113] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.

[0114] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0115] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

[0116] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0117] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0118] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0119] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0120] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. An information processing method, characterized in that: include: According to the attributes of the data table in the database and the attributes of the database, a grammatical control parameter is added to the data table, wherein the grammatical control parameter is used to set an update threshold of the data table; the attributes of the data table include the amount of data in the data table and the priority of the service corresponding to the data table, and the attributes of the database include the load of the database; When the number of updated rows in the data table reaches the update threshold, the statistical information of the data table is updated.

2. The method according to claim 1, characterized in that: The adding of grammar control parameters to the data table according to the attributes of the data table in the database and the attributes of the database comprises: In the process of creating a data table in a database, grammar control parameters are added to the data table according to the properties of the data table in the database and the properties of the database.

3. The method according to claim 1 or 2, characterized in that: According to the attributes of the data table in the database and the attributes of the database, adding syntax control parameters to the data table includes: Determine an update threshold of the data table according to the first update threshold, the second update threshold and the third update threshold, and add a grammar control parameter to the data table; The first update threshold is positively correlated with the amount of data in the data table, the second update threshold is negatively correlated with the priority of the business corresponding to the data table, and the third update threshold is positively correlated with the load of the database.

4. The method according to claim 1 or 2, characterized in that: The method further comprises: When performing a change operation on the data table, adjusting the update threshold according to the change characteristics of the change operation; and / or, After the statistical information of the data table is updated, the update threshold is adjusted according to the historical data growth characteristics, the historical query frequency and the historical data change characteristics.

5. The method according to claim 4, characterized in that The change characteristics of the change operation include addition, deletion or modification; The change characteristics of the change operation include reducing the update threshold when adding or modifying, and maintaining or increasing the update threshold when deleting; or, the change characteristics of the change operation include maintaining or reducing the update threshold when adding or modifying, and increasing the update threshold when deleting; The historical data growth characteristic includes the amount of growth data within a preset time, the historical query frequency includes the number of queries within the preset time, and the historical data change characteristic includes the number of addition operations, deletion operations, and modification operations within the preset time; The growth data volume, the query times, the addition operation times, the deletion operation times and the modification operation times are positively correlated with the adjusted update threshold.

6. The method according to claim 1 or 2, characterized in that: The data table includes a sub-table and / or an inheritance table in a partition table, and the data table has a corresponding root table; When the number of rows updated in the data table reaches the update threshold, updating the statistical information of the data table includes: Monitor update operations of the data table and a root table corresponding to the data table, and record the number of rows of update operations corresponding to the data table and the number of rows of update operations corresponding to the root table; When the number of rows corresponding to the update operation corresponding to the root table reaches the update threshold, the statistical information of the data table and the statistical information of the root table are updated; When the number of rows corresponding to the update operation corresponding to the data table reaches the update threshold, the statistical information of the data table is updated.

7. A data processing device, characterized in that: The device comprises: A setting module, used for adding grammatical control parameters to the data table according to the attributes of the data table in the database and the attributes of the database, wherein the grammatical control parameters are used to set the update threshold of the data table; the attributes of the data table include the amount of data in the data table and the priority of the business corresponding to the data table, and the attributes of the database include the load of the database; The update module is used to update the statistical information of the data table when the number of updated rows of the data table reaches the update threshold.

8. An electronic device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.

10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 6 when being executed by a processor.