Database management method for enterprise supply chain
By partitioning data tables and database sub-databases in the database, combined with index optimization, the problem of slow query speed and poor performance caused by excessive data volume is solved, and the query speed and performance of the database are improved.
Patent Information
- Application Number
- CN202410279313.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-12
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-03-12
AI Technical Summary
In the existing technology, due to the large amount of data stored in the database, the query speed of the database is low and the performance of the database is poor.
The loading speed determination module determines whether the data loading speed meets the standard. If it does not meet the standard, the cause determination module determines the reason. If the amount of data in the data table or database is too large, the data table is partitioned and the database is sub-database, and an index is established to improve the query. Speed and performance.
Through partitioning and sub-database operations, the calculation amount of data query is reduced, the query speed and performance of the database are improved, and the performance bottleneck of a single database is avoided.
Smart Images

Figure CN118227620B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data management, and in particular to a database management method for an enterprise supply chain. Background Art
[0002] Since the late 1960s, the scale of computer management has become increasingly larger, the application has become more extensive, and the amount of data has increased dramatically. The file system as a means of data management can no longer meet the needs of applications, so database management technology came into being.
[0003] Chinese Patent Publication No.: CN106095954B discloses a database management method for an enterprise supply chain, which includes: before accessing the data on the cloud storage platform, authenticating the user so that the user can access the data based on the granted permissions. Through the data synchronization security mechanism of the cloud storage system, enterprise users can synchronize and share files conveniently and securely, and enterprise administrators can also intuitively understand the operating status of the system.
[0004] However, in the prior art, due to the large amount of data stored in the database, it often leads to problems such as low database query speed and poor database performance. Summary of the invention
[0005] To this end, the present invention provides a database management method for an enterprise supply chain, so as to overcome the problems in the prior art of low database query speed and poor database performance due to a large amount of data stored in the database.
[0006] To achieve the above object, the present invention provides a database management method for an enterprise supply chain, comprising:
[0007] Step S1, the loading speed determination module determines whether the data loading speed meets the standard according to the data loading amount per unit time, if not, proceeding to step S2;
[0008] Step S2, the cause determination module determines the cause of the data loading speed not meeting the standard according to the amount of data stored in the data table, and proceeds to step S3 or jumps to step S5 according to the determined cause;
[0009] Step S3, if it is determined that the reason why the data loading speed does not meet the standard is that the amount of stored data in the data table is too large, the partitioning module calculates the partitioning parameters to partition the data table, and determines the number of partitions of the data table;
[0010] Step S4, the index creation module creates an index for the partitioned data table and calculates index parameters to determine the number of indexes created for the partitioned data table;
[0011] Step S5: If it is determined that the reason why the data loading speed does not meet the standard is that the amount of stored data in the database is too large, the database needs to be divided into sub-databases. The sub-database module calculates the sub-database parameters based on the amount of data update per unit time to determine the number of sub-databases.
[0012] Further, in the step S1, the loading speed determination module determines whether the data loading speed meets the standard according to the data loading amount per unit time;
[0013] If the data loading amount per unit time is less than or equal to a preset data loading amount comparison value, the loading speed determination module determines that the data loading speed does not meet the standard.
[0014] Furthermore, in the step S2, it includes:
[0015] Step S21, the cause determination module is provided with a data volume comparison value, and the cause determination module compares the storage data volume of the data table with the data volume comparison value;
[0016] Step S22, if the amount of data stored in the data table is greater than the data amount comparison value, the cause determination module determines that the reason why the data loading speed does not meet the standard is that the amount of data stored in the data table is too large;
[0017] Step S23, if the amount of stored data in the data table is less than or equal to the data amount comparison value, the cause determination module determines that the reason why the data loading speed does not meet the standard is that the amount of stored data in the database is too large.
[0018] Furthermore, in step S3,
[0019] When it is determined that the reason why the data loading speed does not meet the standard is that the amount of stored data in the data table is too large, the partitioning module determines that the data table needs to be partitioned, and calculates the partitioning parameters to determine the number of partitions of the data table;
[0020] The partition parameter is the difference between the amount of stored data in the data table and the data amount comparison value.
[0021] Furthermore, the partitioning module determines the number of partitions of the data table according to the partitioning parameter. The partitioning module is provided with several determination methods for the number of partitions of the data table based on the partitioning parameter, and each determination method determines a different number of partitions.
[0022] Furthermore, the partitioning module detects the amount of stored data in each data table in the database, and partitions the data tables whose stored data amounts are greater than the data amount comparison value one by one.
[0023] Further, in step S4,
[0024] After the partitioning module completes the partitioning of the data table whose storage data volume is greater than the data volume comparison value, the index establishment module establishes an index for the partitioned data table, and the index establishment module calculates the index parameter according to the number of partitions of the data table to determine the number of indexes established for the partitioned data table;
[0025] The index parameter is the difference between the number of partitions of the data table and a standard value of the number of partitions.
[0026] Furthermore, the index establishment module determines the number of indexes established for the partitioned data table according to the index parameters. The index establishment module is provided with several determination methods for the number of indexes for the partitioned data table based on the index parameters, and each determination method determines a different number of indexes.
[0027] Furthermore, when the reason why the data loading speed does not meet the standard is that the amount of stored data in the database is too large, the sub-library module determines that the stored data in the database needs to be sub-libraryed, and obtains the amount of data update per unit time to determine the number of sub-libraries;
[0028] If the data update amount per unit time is less than or equal to a preset data update amount comparison value, the sub-library module determines to set the number of sub-libraries as the initial value of the number of sub-libraries.
[0029] Furthermore, if the data update amount per unit time is greater than a preset data update amount comparison value, the library sub-module calculates the library sub-parameter and determines the number of library sub-parameters according to the library sub-parameter. The library sub-module is provided with a plurality of determination methods for the number of library sub-parameters based on the library sub-parameter, and each determination method determines a different number of library sub-parameters.
[0030] The database partition parameter is the difference between the data update amount per unit time and a preset data update amount comparison value.
[0031] Compared with the prior art, the beneficial effect of the present invention lies in that the present invention determines whether the data loading speed meets the standard through the data loading amount per unit time, and when it is determined that the data loading speed does not meet the standard, the reason why the data loading speed does not meet the standard is determined according to the amount of data stored in the data table, and corresponding processing measures are taken according to the determined reasons. The processing measures include partitioning the data table and sharding the database. Through the partitioning operation, the amount of calculation during data query is reduced and the query speed of the database is improved. Through the sharding operation, the operating space of the database is increased and the performance of the database is improved.
[0032] Furthermore, a data table is a basic unit for presenting data in a database. If a single data table stores a large amount of data, the efficiency of data query will be affected. When the present invention determines that the amount of stored data in a data table is too large, the data table is partitioned, and only data in a specific partition needs to be queried during query, thereby reducing the number of database operations and improving the query speed and performance of the database.
[0033] Furthermore, when partitioning a data table, the present invention determines the number of partitions of the data table based on a partition parameter, that is, the difference between the amount of stored data in the data table and the data volume comparison value, thereby ensuring that the amount of data in each partition is within a reasonable range, avoiding the situation where cross-region data retrieval occurs due to too little data in the partition, and further improving the query speed and performance of the database.
[0034] Furthermore, indexes play an important role in databases. Creating indexes can quickly locate data during queries, thereby improving the query speed of the database. However, if too many indexes are created, more disk space will be occupied, affecting the performance of the database. The present invention sets an initial value for the number of indexes and an index number adjustment coefficient, and selects a corresponding index number adjustment coefficient based on a comparison result between the index parameter and a first preset index parameter comparison value and a second preset index parameter comparison value to determine the number of indexes of the partitioned data table. On the one hand, a step-by-step increase in the number of indexes is achieved, and on the other hand, the number of indexes is controlled to match the number of partitions. By optimizing the number of indexes, the query speed and performance of the database are further improved.
[0035] Furthermore, when the amount of data reaches a certain level, a single database cannot meet the usage needs. At this time, the data is split into different databases to avoid the performance bottleneck of a single database. The present invention determines the number of sub-libraries based on the sub-library parameter, that is, the difference between the data update amount per unit time and the preset data update amount comparison value. When the data update amount per unit time is large, it means that the available memory of the database is consumed faster. At this time, the number of sub-libraries determined is large, thereby avoiding reaching the performance bottleneck of the database in a short time. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a flow chart of a database management method for an enterprise supply chain according to an embodiment of the present invention;
[0037] Figure 2 This is a flow chart of step S2 in the database management method for an enterprise supply chain according to an embodiment of the present invention. DETAILED DESCRIPTION
[0038] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0039] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.
[0040] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.
[0041] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0042] It should be pointed out that the data in this embodiment are obtained by the database management method for enterprise supply chain described in the present invention based on historical control data and corresponding data statistics in previous database management processes, zoning and library experiments, and comprehensive analysis based on experimental results; those skilled in the art can understand that the database management method for enterprise supply chain described in the present invention can select the value with the highest proportion as the preset standard parameter according to the data distribution, as long as the present invention can clearly define different specific situations in the single determination process through the obtained values.
[0043] See also Figure 1 and Figure 2 As shown, the database management method for enterprise supply chain of the present invention comprises:
[0044] Step S1, the loading speed determination module determines whether the data loading speed meets the standard according to the data loading amount per unit time, if not, proceeding to step S2;
[0045] Step S2, the cause determination module determines the cause of the data loading speed not meeting the standard according to the amount of data stored in the data table, and proceeds to step S3 or jumps to step S5 according to the determined cause;
[0046] Step S3, if it is determined that the reason why the data loading speed does not meet the standard is that the amount of stored data in the data table is too large, the partitioning module calculates the partitioning parameters to partition the data table, and determines the number of partitions of the data table;
[0047] Step S4, the index creation module creates an index for the partitioned data table and calculates index parameters to determine the number of indexes created for the partitioned data table;
[0048] Step S5: If it is determined that the reason why the data loading speed does not meet the standard is that the amount of stored data in the database is too large, the database needs to be divided into sub-databases. The sub-database module calculates the sub-database parameters based on the amount of data update per unit time to determine the number of sub-databases.
[0049] The present invention determines whether the data loading speed meets the standard according to the data loading amount per unit time, and when it is determined that the data loading speed does not meet the standard, the reason why the data loading speed does not meet the standard is determined according to the storage data amount of the data table, and corresponding processing measures are taken according to the determined reasons. The processing measures include partitioning the data table and sharding the database. Through the partitioning operation, the amount of calculation during data query is reduced and the query speed of the database is improved. Through the sharding operation, the operating space of the database is increased and the performance of the database is improved.
[0050] Specifically, in step S1, the loading speed determination module determines whether the data loading speed meets the standard according to the data loading amount per unit time;
[0051] Among them, if the data loading amount per unit time is greater than the preset data loading amount comparison value, the loading speed judgment module determines that the data loading speed meets the standard; if the data loading amount per unit time is less than or equal to the preset data loading amount comparison value, the loading speed judgment module determines that the data loading speed does not meet the standard.
[0052] Specifically, the step S2 includes:
[0053] Step S21, the cause determination module is provided with a data volume comparison value, and the cause determination module compares the storage data volume of the data table with the data volume comparison value;
[0054] Step S22, if the amount of data stored in the data table is greater than the data amount comparison value, the cause determination module determines that the reason why the data loading speed does not meet the standard is that the amount of data stored in the data table is too large;
[0055] Step S23, if the amount of stored data in the data table is less than or equal to the data amount comparison value, the cause determination module determines that the reason why the data loading speed does not meet the standard is that the amount of stored data in the database is too large.
[0056] Specifically, in step S3,
[0057] When it is determined that the reason why the data loading speed does not meet the standard is that the amount of stored data in the data table is too large, the partitioning module determines that the data table needs to be partitioned, and calculates the partitioning parameters to determine the number of partitions of the data table;
[0058] The partition parameter is the difference between the amount of stored data in the data table and the data amount comparison value.
[0059] A data table is the basic unit for presenting data in a database. If a single data table stores a large amount of data, the efficiency of data query will be affected. When the present invention determines that the amount of stored data in a data table is too large, the data table is partitioned, and only data in a specific partition needs to be queried during query, thereby reducing the number of database operations and improving the query speed and performance of the database.
[0060] In this embodiment, data may be partitioned according to geographic location, time, business, and other rules. Data table partitioning is a mature existing technology and will not be described in detail in this embodiment.
[0061] Specifically, the partitioning module determines the number of partitions of the data table according to the partitioning parameters. The partitioning module is provided with several determination methods for the number of partitions of the data table based on the partitioning parameters, and each determination method determines a different number of partitions.
[0062] The partition module is provided with a first partition quantity adjustment coefficient α1 and a second partition quantity adjustment coefficient α2, 1.1<α1<α2<1.5, and is also provided with a first preset partition parameter comparison value and a second preset partition parameter comparison value. The first preset partition parameter comparison value is smaller than the second preset partition parameter comparison value. In this embodiment, α1=1.2, α2=1.4 are preferred. In this embodiment, each partition quantity adjustment coefficient and each preset partition parameter comparison value can be set according to actual needs.
[0063] The partition module compares the partition parameter with a first preset partition parameter comparison value and a second preset partition parameter comparison value respectively, wherein:
[0064] If the partition parameter is less than the first preset partition parameter comparison value, the partition module determines the number of partitions of the data table as a preset initial value of the number of partitions;
[0065] If the partition parameter is less than the second preset partition parameter comparison value and greater than or equal to the first preset partition parameter comparison value, the partition module selects the first partition quantity adjustment coefficient α1 to determine the partition quantity of the data table, and sets the partition quantity to the product of the initial partition quantity value and the first partition quantity adjustment coefficient α1;
[0066] If the partition parameter is greater than or equal to the second preset partition parameter comparison value, the partition module selects the second partition quantity adjustment coefficient α2 to determine the partition quantity of the data table, and sets the partition quantity to the product of the initial partition quantity value and the second partition quantity adjustment coefficient α2;
[0067] If the calculated number of partitions is not a positive integer, the value of the number of partitions is the smallest positive integer greater than the calculated value.
[0068] The initial value of the number of partitions can be set and adjusted according to actual needs.
[0069] When partitioning a data table, the present invention determines the number of partitions of the data table based on a partition parameter, that is, the difference between the amount of stored data in the data table and the data amount comparison value, thereby ensuring that the amount of data in each partition is within a reasonable range, avoiding the situation where cross-region data retrieval occurs due to too little data in the partition, and further improving the query speed and performance of the database.
[0070] Specifically, the partitioning module detects the storage data volume of each data table in the database, and partitions the data tables whose storage data volume is greater than the data volume comparison value one by one.
[0071] Specifically, in step S4,
[0072] After the partitioning module completes the partitioning of the data table whose storage data volume is greater than the data volume comparison value, the index establishment module establishes an index for the partitioned data table, and the index establishment module calculates the index parameter according to the number of partitions of the data table to determine the number of indexes established for the partitioned data table;
[0073] The index parameter is the difference between the number of partitions of the data table and a standard value of the number of partitions.
[0074] Specifically, the index establishment module determines the number of indexes established for the partitioned data table according to the index parameters. The index establishment module is provided with several methods for determining the number of indexes for the partitioned data table based on the index parameters, and each determination method determines a different number of indexes.
[0075] The index establishment module is provided with a first index quantity adjustment coefficient β1 and a second index quantity adjustment coefficient β2, 1<β1<β2<1.2, and is also provided with a first preset index parameter comparison value and a second preset index parameter comparison value. The first preset index parameter comparison value is smaller than the second preset index parameter comparison value. In this embodiment, β1=1.05 and β2=1.1 are preferably used. In this embodiment, each index quantity adjustment coefficient and each preset index parameter comparison value can be set according to actual needs.
[0076] The index establishment module compares the index parameter with the first preset index parameter comparison value and the second preset index parameter comparison value respectively, wherein:
[0077] If the index parameter is less than the first preset index parameter comparison value, the index establishment module determines the number of indexes of the partitioned data table as a preset index number initial value;
[0078] If the index parameter is less than the second preset index parameter comparison value and greater than or equal to the first preset index parameter comparison value, the index establishment module selects the first index quantity adjustment coefficient β1 to determine the number of indexes of the partitioned data table, and sets the number of indexes to the product of the initial value of the index quantity and the first index quantity adjustment coefficient β1;
[0079] If the index parameter is greater than or equal to the second preset index parameter comparison value, the index establishment module selects the second index quantity adjustment coefficient β2 to determine the number of indexes of the partitioned data table, and sets the number of indexes to the product of the initial value of the index quantity and the second index quantity adjustment coefficient β2;
[0080] If the calculated number of indexes is not a positive integer, the value of the number of indexes is the smallest positive integer greater than the calculated value.
[0081] The initial value of the index quantity can be set and adjusted according to actual needs.
[0082] More specifically, after determining the number of indexes, the index creation module counts the frequency of each query field in the historical records of the data table, and arranges the frequencies in descending order, and determines the indexes of the partitioned data table in sequence according to the arrangement order.
[0083] Indexes are an important part of a database. Optimizing indexes can greatly improve the query speed and performance of a database. For frequently queried fields, you need to create appropriate indexes so that you can quickly locate data when querying. At the same time, avoid adding indexes to every field, because this will cause the index to take up more disk space and affect performance when inserting and updating data.
[0084] Indexes play an important role in databases. Creating indexes can quickly locate data during queries, thereby improving the query speed of the database. However, if too many indexes are created, more disk space will be occupied, affecting the performance of the database. The present invention sets an initial value for the number of indexes and an index number adjustment coefficient, and selects a corresponding index number adjustment coefficient based on a comparison result between the index parameter and a first preset index parameter comparison value and a second preset index parameter comparison value to determine the number of indexes of the partitioned data table. On the one hand, a step-by-step increase in the number of indexes is achieved, and on the other hand, the number of indexes is controlled to match the number of partitions. By optimizing the number of indexes, the query speed and performance of the database are further improved.
[0085] Specifically, when the reason why the data loading speed does not meet the standard is that the amount of stored data in the database is too large, the sub-library module determines that the stored data in the database needs to be sub-libraryed, and obtains the amount of data update per unit time to determine the number of sub-libraries;
[0086] If the data update amount per unit time is less than or equal to a preset data update amount comparison value, the sub-library module determines to set the number of sub-libraries as the initial value of the number of sub-libraries.
[0087] Specifically, if the data update amount per unit time is greater than a preset data update amount comparison value, the sub-library module calculates the sub-library parameter and determines the number of sub-libraries according to the sub-library parameter. The sub-library module is provided with several determination methods for the number of sub-libraries based on the sub-library parameter, and each determination method determines a different number of sub-libraries.
[0088] The database partition parameter is the difference between the data update amount per unit time and a preset data update amount comparison value.
[0089] The sub-library module is provided with a first sub-library quantity adjustment coefficient γ1, a second sub-library quantity adjustment coefficient γ2 and a third sub-library quantity adjustment coefficient γ3, 1<γ1<γ2<γ3<1.2, and is also provided with a first preset sub-library parameter comparison value and a second preset sub-library parameter comparison value. The first preset sub-library parameter comparison value is smaller than the second preset sub-library parameter comparison value. In this embodiment, preferably γ1=1.05, γ2=1.1, γ3=1.15. In this embodiment, each sub-library quantity adjustment coefficient and each preset sub-library parameter comparison value can be set according to actual needs.
[0090] The library sub-module compares the library sub-parameter with a first preset library sub-parameter comparison value and a second preset library sub-parameter comparison value, wherein:
[0091] If the sub-library parameter is less than the first preset sub-library parameter comparison value, the sub-library module selects the first sub-library quantity adjustment coefficient γ1 to determine the number of sub-libraries of the database, and sets the number of sub-libraries to the product of the initial value of the number of sub-libraries and the first sub-library quantity adjustment coefficient γ1;
[0092] If the sub-library parameter is less than the second preset sub-library parameter comparison value and greater than or equal to the first preset sub-library parameter comparison value, the sub-library module selects the second sub-library quantity adjustment coefficient γ2 to determine the number of sub-libraries in the database, and sets the number of sub-libraries to the product of the initial value of the number of sub-libraries and the second sub-library quantity adjustment coefficient γ2;
[0093] If the sub-library parameter is greater than or equal to the second preset sub-library parameter comparison value, the sub-library module selects the third sub-library quantity adjustment coefficient γ3 to determine the number of sub-libraries of the database, and sets the number of sub-libraries to the product of the initial value of the number of sub-libraries and the third sub-library quantity adjustment coefficient γ3;
[0094] If the calculated number of sub-databases is not a positive integer, the value of the number of sub-databases is the smallest positive integer greater than the calculated value.
[0095] The initial value of the number of sub-libraries can be set and adjusted according to actual needs.
[0096] When the amount of data reaches a certain level, a single database cannot meet the usage needs. At this time, the data is split into different databases to avoid the performance bottleneck of a single database. The present invention determines the number of sub-libraries based on the sub-library parameter, that is, the difference between the data update amount per unit time and the preset data update amount comparison value. When the data update amount per unit time is large, it means that the available memory of the database is consumed faster. At this time, the number of sub-libraries determined is large, thereby avoiding reaching the performance bottleneck of the database in a short time.
[0097] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
[0098] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A database management method for an enterprise supply chain, characterized in that: include: Step S1, the loading speed determination module determines whether the data loading speed meets the standard according to the data loading amount per unit time, if not, proceeding to step S2; Step S2, the cause determination module determines the cause of the data loading speed not meeting the standard according to the amount of data stored in the data table, and proceeds to step S3 or jumps to step S5 according to the determined cause; Step S3, if it is determined that the reason why the data loading speed does not meet the standard is that the amount of stored data in the data table is too large, the partitioning module calculates the partitioning parameters to partition the data table, and determines the number of partitions of the data table; Step S4, the index creation module creates an index for the partitioned data table and calculates index parameters to determine the number of indexes created for the partitioned data table; Step S5: If it is determined that the reason why the data loading speed does not meet the standard is that the amount of stored data in the database is too large, the database needs to be divided into sub-databases. The sub-database module calculates the sub-database parameters based on the amount of data update per unit time to determine the number of sub-databases.
2. The database management method for enterprise supply chain according to claim 1, characterized in that: In the step S1, the loading speed determination module determines whether the data loading speed meets the standard according to the data loading amount per unit time; If the data loading amount per unit time is less than or equal to a preset data loading amount comparison value, the loading speed determination module determines that the data loading speed does not meet the standard.
3. The database management method for enterprise supply chain according to claim 2, characterized in that: In the step S2, it includes: Step S21, the cause determination module is provided with a data volume comparison value, and the cause determination module compares the storage data volume of the data table with the data volume comparison value; Step S22, if the amount of data stored in the data table is greater than the data amount comparison value, the cause determination module determines that the reason why the data loading speed does not meet the standard is that the amount of data stored in the data table is too large; Step S23, if the amount of stored data in the data table is less than or equal to the data amount comparison value, the cause determination module determines that the reason why the data loading speed does not meet the standard is that the amount of stored data in the database is too large.
4. The database management method for enterprise supply chain according to claim 3, characterized in that: In step S3, when it is determined that the reason why the data loading speed does not meet the standard is that the amount of data stored in the data table is too large, the partitioning module determines that the data table needs to be partitioned, and calculates the partitioning parameter to determine the number of partitions of the data table; The partition parameter is the difference between the amount of stored data in the data table and the data amount comparison value.
5. The database management method for enterprise supply chain according to claim 4, characterized in that: The partitioning module determines the number of partitions of the data table according to the partitioning parameters. The partitioning module is provided with several determination methods for the number of partitions of the data table based on the partitioning parameters, and each determination method determines a different number of partitions.
6. The database management method for enterprise supply chain according to claim 5, characterized in that: The partitioning module detects the storage data volume of each data table in the database, and partitions the data tables whose storage data volume is greater than the data volume comparison value one by one.
7. The database management method for enterprise supply chain according to claim 6, characterized in that: In step S4, after the partitioning module completes the partitioning of the data table whose storage data volume is greater than the data volume comparison value, the index establishment module establishes an index for the partitioned data table, and the index establishment module calculates the index parameter according to the number of partitions of the data table to determine the number of indexes established for the partitioned data table; The index parameter is the difference between the number of partitions of the data table and a standard value of the number of partitions.
8. The database management method for enterprise supply chain according to claim 7, characterized in that: The index establishment module determines the number of indexes established for the partitioned data table according to the index parameters. The index establishment module is provided with several methods for determining the number of indexes for the partitioned data table based on the index parameters, and each determination method determines a different number of indexes.
9. The database management method for enterprise supply chain according to claim 8, characterized in that: When the reason why the data loading speed does not meet the standard is that the amount of stored data in the database is too large, the sub-library module determines that the stored data in the database needs to be sub-libraryed, and obtains the amount of data update per unit time to determine the number of sub-libraries; If the data update amount per unit time is less than or equal to a preset data update amount comparison value, the sub-library module determines to set the number of sub-libraries as the initial value of the number of sub-libraries.
10. The database management method for enterprise supply chain according to claim 9, characterized in that: If the data update amount per unit time is greater than the preset data update amount comparison value, the library sub-module calculates the library sub-parameter and determines the number of library sub-parameters according to the library sub-parameter. The library sub-module is provided with several determination methods for the number of library sub-parameters based on the library sub-parameter, and each determination method determines a different number of library sub-parameters. The database partition parameter is the difference between the data update amount per unit time and a preset data update amount comparison value.
