Data migration performance test method and device, computer equipment and storage medium

During the database migration process, priority values ​​are determined based on the condition weights and performance parameters of the structured query statement and targeted performance tests are carried out, and the problem of low performance test stability after database migration is solved, and more accurate and stable data migration results are achieved.

CN120066911APending Publication Date: 2025-05-30INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410541832.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-30
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

During the database migration process, due to the underlying differences between databases, incompatibility problems are prone to occur, resulting in low performance testing stability after data migration.

Method used

By obtaining the conditional weights and performance parameters of each structured query statement executed by the application in the database to be migrated, the priority value of the corresponding statement is determined, and the target structured query statement is determined based on the priority value and the remaining time of the application to be online, and the performance tests are performed on the migration database and the target database to be migrated, and the results are compared to determine the data migration results.

Benefits of technology

Improves the stability and accuracy of data migration performance testing, ensuring the accuracy of data migration results from the database to be migrated to the target database.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120066911A_ABST
    Figure CN120066911A_ABST
Patent Text Reader

Abstract

The invention relates to a data migration performance testing method and device, computer equipment and a storage medium, and relates to the technical field of software testing. The method can be used in financial science and technology fields or other related fields. The method comprises the steps of obtaining a condition weight corresponding to each structured query statement executed by an application program in a to-be-migrated database, and a performance parameter corresponding to each structured query statement in a preset time period; determining priority values of the corresponding structured query statements based on the condition weights and the performance parameters; determining a target structured query statement based on the priority value and the online remaining duration of the application program; and determining a data migration result on the basis of a first performance test result obtained by performing a performance test on the target structured query statement in the to-be-migrated database and a second performance test result obtained by screening out the target structured query statement from a target database and performing the performance test on the target structured query statement. By adopting the method, the performance test stability can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of software testing, and particularly to a data migration performance testing method, device, computer device, and storage medium. Background Art

[0002] With the development of fintech and to ensure the security of the supply chain, it is urgent to accelerate the pace of database transformation. There are underlying differences between databases, and incompatibility problems will occur during the data migration process. Therefore, to ensure the stable operation of the migrated data between databases, it is necessary to perform performance testing on the migrated data.

[0003] In traditional technologies, the principle of covering key transaction data is generally adopted for performance testing, and the coverage scenarios have limitations, which easily lead to low stability of performance testing. Summary of the Invention

[0004] Based on this, it is necessary to provide a data migration performance testing method, device, computer device, and storage medium that can improve the stability of performance testing for the above technical problems.

[0005] In a first aspect, this application provides a data migration performance testing method. The method includes:

[0006] Obtain the conditional weight corresponding to each structured query statement executed by the application program in the database to be migrated, and the performance parameter corresponding to each structured query statement within a preset time period;

[0007] Based on the conditional weight and the performance parameter, determine the priority value of the corresponding structured query statement;

[0008] Based on the priority value and the remaining time until the application program goes live, determine the target structured query statement;

[0009] Perform performance testing on the target structured query statement in the database to be migrated to obtain a first performance test result;

[0010] Screen out the target structured query statement in the target database for performance testing to obtain a second performance test result;

[0011] Use the comparison result of the first performance test result and the second performance test result to determine the data migration result from the database to be migrated to the target database.

[0012] In one embodiment, the parameters involved in the conditional weight include at least one of a service scenario, a service nature, a table data volume, or a table nature; the performance parameters include at least one of an execution time-consuming parameter, an execution frequency parameter, an execution computing resource parameter, or an execution table data row count; wherein, the execution time-consuming parameter includes at least one of an average time-consuming, a median time-consuming, a maximum time-consuming, or a preset percentile time-consuming, and the execution computing resource parameter is determined based on the occupied central processing unit resources and the occupied hard disk resources.

[0013] In one embodiment, determining the data migration result from the database to be migrated to the target database by using the comparison result between the first performance test result and the second performance test result includes:

[0014] When the decrease ratio of the second performance test result compared with the first performance test result is not greater than a preset ratio, it is determined that the performance test for migrating from the database to be migrated to the target database passes.

[0015] In one embodiment, determining the priority value of the corresponding structured query statement based on the conditional weight and the performance parameter includes:

[0016] Taking the product result among the conditional weight, the performance parameter, and the preset adjustment parameter as the priority value of the corresponding structured query statement.

[0017] In one embodiment, determining the target structured query statement based on the priority value and the remaining time until the application goes live includes:

[0018] Determining the statement test ratio based on a preset maximum test ratio and the remaining time until the application goes live;

[0019] Sorting each structured query statement in descending order according to the priority value, and selecting the structured query statement ranked at the front based on the statement test ratio as the target structured query statement.

[0020] In one embodiment, determining the statement test ratio based on a preset maximum test ratio and the remaining time until the application goes live includes:

[0021] When the remaining time until the application goes live is greater than a preset time threshold, taking the preset maximum test ratio as the statement test ratio;

[0022] When the remaining time until the application goes live is not greater than the preset time threshold, determining the statement test ratio based on a test ratio determination function, the preset maximum test ratio, and the remaining time until the application goes live.

[0023] In one embodiment, the parameters involved in the first performance test result and the second performance test result are the same, and the parameters include at least one of the amount of data processed by the database per second, the average execution time of the target structured query statement, or the database computing resources occupied; wherein, the database computing resources occupied include at least one of the central processing unit resources occupied, the memory resources occupied, or the hard disk resources occupied.

[0024] In a second aspect, the present application further provides a data migration performance test device. The device includes:

[0025] A parameter acquisition module, configured to acquire the conditional weight corresponding to each structured query statement executed by the application program in the database to be migrated, and the performance parameters corresponding to each structured query statement within a preset time period;

[0026] A priority value determination module, configured to determine the priority value of the corresponding structured query statement based on the conditional weight and the performance parameters;

[0027] A target statement determination module, configured to determine the target structured query statement based on the priority value and the remaining time until the application program goes live;

[0028] A first test result acquisition module, configured to perform a performance test on the target structured query statement in the database to be migrated to obtain a first performance test result;

[0029] A second test result acquisition module, configured to screen out the target structured query statement in the target database for performance testing to obtain a second performance test result;

[0030] A migration result determination module, configured to determine the data migration result from the database to be migrated to the target database by using the comparison result of the first performance test result and the second performance test result.

[0031] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the steps of any of the above methods are implemented.

[0032] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0033] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0034] The above data migration performance testing method, device, computer device and storage medium determine the priority value of each structured query statement corresponding to the conditional weight of each structured query statement executed by the application program in the database to be migrated and the performance parameters corresponding to each structured query statement within a preset time period, determine the target structured query statement based on the priority value and the remaining time before the application program goes live, perform performance testing on the target structured query statements in the database to be migrated and the target database, obtain the first performance test result and the second performance test result, and thus determine the data migration result from the database to be migrated to the target database. Compared with the problem of low performance test stability caused by using the principle of covering key transaction data in traditional technologies, the present application determines the target structured query statement based on the priority value of each structured query statement in the application program and the remaining time before the application program goes live, and then performs performance testing on the database to be migrated and the target database respectively based on the target structured query statement, and the obtained data migration result is relatively accurate. Moreover, it considers the priority value of the structured query statement rather than the structured query statement corresponding to the key transaction scenario, ensuring the stability of the performance test. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0036] Figure 1 It is a flowchart of the data migration performance testing method provided in the embodiments of the present application;

[0037] Figure 2 It is a flowchart of determining the target structured query statement in one embodiment;

[0038] Figure 3 It is a structural block diagram of a data migration performance testing device provided in the embodiments of the present application;

[0039] Figure 4 It is an internal structure diagram of a computer device provided in the embodiments of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0040] In order to make the objectives, technical solutions and advantages of the present application clearer, the following further details the present application in conjunction with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0041] In this embodiment, a method for testing data migration performance is provided. In this embodiment, taking the application of this method to a computer device as an example, it can be understood that this method can also be applied to a server, and can also be applied to a system including a computer device and a server, and is implemented through the interaction between the computer device and the server.

[0042] Figure 1 It is a schematic flowchart of the method for testing data migration performance provided in the embodiments of the present application. This method is applied to a computer device. In one embodiment, as Figure 1 shown, it includes the following steps:

[0043] S101, obtain the condition weight corresponding to each structured query statement executed by the application program in the database to be migrated, and the performance parameter corresponding to each structured query statement within a preset time period.

[0044] Among them, the application program is the data to be migrated. The database to be migrated is the original database. Taking the performance test result of the database to be migrated as the standard, determine the quality of the performance test result of the application program migrated to the target database. The structured query statement is an SQL (Structured Query Language) statement. The condition weight and performance parameter are used to reflect the importance of the structured query statement. The preset time period can be set manually. It should be noted that in the case where there are multiple types of performance parameters, the preset time periods corresponding to different types of performance parameters may be different.

[0045] S102, based on the condition weight and performance parameter, determine the priority value of the corresponding structured query statement.

[0046] Among them, the priority value is a value used to reflect the importance of the structured query statement. The larger the priority value, the more important the structured query statement is, that is, the more it needs to be tested.

[0047] S103, based on the priority value and the remaining time until the application program goes live, determine the target structured query statement.

[0048] Among them, the remaining time until go live is the time length from the current time to the target go-live time of the application program.

[0049] S104, perform a performance test on the target structured query statement in the database to be migrated, and obtain the first performance test result.

[0050] Among them, the first performance test result can be presented in the form of a performance test report.

[0051] S105, screen out the target structured query statement in the target database for performance testing, and obtain the second performance test result.

[0052] Among them, the second performance test result can be presented in the form of a performance test report.

[0053] S106. Determine the data migration result from the database to be migrated to the target database by using the comparison result of the first performance test result and the second performance test result.

[0054] Among them, the data migration result includes passing the performance test and failing the performance test.

[0055] The data migration performance test method provided in this embodiment determines the priority value of the corresponding structured query statement by using the condition weight corresponding to each structured query statement executed by the application program in the database to be migrated and the performance parameter corresponding to each structured query statement within a preset time period. Based on the priority value and the remaining online time of the application program, the target structured query statement is determined. The performance tests are performed on the target structured query statements in the database to be migrated and the target database to obtain the first performance test result and the second performance test result, so as to determine the data migration result from the database to be migrated to the target database. Compared with the problem of low performance test stability caused by using the key transaction data coverage principle for performance testing in the traditional technology, in this embodiment, the target structured query statement is determined based on the priority value of each structured query statement in the application program and the remaining online time of the application program. Then, based on the target structured query statement, the performance tests are respectively performed on the database to be migrated and the target database. The obtained data migration result is relatively accurate, and it considers the priority value of the structured query statement rather than the structured query statement corresponding to the key transaction scenario, ensuring the performance test stability.

[0056] In one embodiment, the parameters involved in the condition weight include at least one of the business scenario, business nature, table data volume, or table nature.

[0057] Among them, the types of the business scenario, business nature, table data volume, and table nature and the corresponding weight values can all be set manually.

[0058] In some embodiments, the types of the business scenario include key customer-facing scenarios, general customer-facing scenarios, key internal scenarios, and general internal scenarios, and the corresponding weight values are 20%, 15%, 10%, and 5% respectively;

[0059] The types of the business nature include online services and batch services, and the corresponding weight values are 30% and 5% respectively; among them, the online service is a real-time or near-real-time service, and the batch service is an asynchronous non-real-time service;

[0060] The type of table data volume corresponds to the data volume range, and the data volume ranges are respectively greater than 100 million, not greater than 100 million and greater than 10 million, not greater than 10 million and greater than 1 million, and not greater than 1 million. The corresponding weight values are 30%, 15%, 10%, and 5% respectively;

[0061] The types of table properties include data hot spot data tables, database log tables, general database data tables, and database parameter tables, and the corresponding weight values are 20%, 15%, 10%, and 5% respectively.

[0062] In this embodiment, the mentioned parameters of parameter business scenario, business nature, table data volume, and table nature are parameters for judging the importance of structured query statements, which can improve the accuracy of the determined priority value of the structured query statement.

[0063] In one embodiment, the performance parameters include at least one of an execution time-consuming parameter, an execution frequency parameter, an execution computing resource parameter, or an execution table data row number; wherein, the execution time-consuming parameter includes at least one of an average time-consuming, a median time-consuming, a maximum time-consuming, or a preset percentile time-consuming, and the execution computing resource parameter is determined based on the occupied central processing unit resource and the occupied hard disk resource.

[0064] Specifically, the preset percentile time-consuming is to sort the time-consuming of each execution of this structured query statement, and use the time-consuming of the preset percentile in the sequence as the preset percentile time-consuming. For example, the preset percentile time-consuming is 90% time-consuming.

[0065] In some embodiments, the execution computing resource parameter is determined based on the occupied central processing unit resource and the occupied hard disk resource, including:

[0066] Multiply the occupied central processing unit resource by 70% and the occupied hard disk resource by 30% as the execution computing resource parameter.

[0067] In this embodiment, the mentioned parameters of execution time-consuming parameter, execution frequency parameter, execution computing resource parameter, and execution table data row number are parameters for judging the importance of structured query statements, which can improve the accuracy of the determined priority value of the structured query statement.

[0068] In one embodiment, using the comparison result of the first performance test result and the second performance test result to determine the data migration result from the database to be migrated to the target database, including:

[0069] When the decrease ratio of the second performance test result compared to the first performance test result is not greater than the preset ratio, it is determined that the performance test from the database to be migrated to the target database passes.

[0070] Among them, the preset ratio can be set manually, and for different types of performance test results, the preset ratio can be set to different values.

[0071] In this embodiment, by analyzing the decrease ratio of the second performance test result compared with the first performance test result, the accuracy of the performance test for migrating the database to be migrated to the target database can be verified.

[0072] In one embodiment, based on the conditional weight and the performance parameter, determining the priority value of the corresponding structured query statement includes:

[0073] Taking the product result among the conditional weight, the performance parameter, and the preset adjustment parameter as the priority value of the corresponding structured query statement.

[0074] Wherein, the preset adjustment parameter can be set manually. The range of the preset adjustment parameter is 1% - 100%.

[0075] In this embodiment, the importance degree of the structured query statement can be flexibly adjusted through the preset adjustment parameter, improving the accuracy of the determined priority value of the structured query statement.

[0076] In one embodiment, based on the priority value and the remaining online duration of the application, determining the process schematic diagram of the target structured query statement, as Figure 2 shown, includes the following content:

[0077] S201, based on the preset maximum test ratio and the remaining online duration of the application, determining the statement test ratio.

[0078] Wherein, the preset maximum test ratio can be set manually. For example, the preset maximum test ratio is set to 30%.

[0079] S202, sorting each structured query statement in descending order according to the priority value, and selecting the structured query statements ranked in the front based on the statement test ratio as the target structured query statements.

[0080] In this embodiment, the test ratio of the structured query statement can be adjusted based on the remaining online duration of the application to ensure that the performance test can be completed on time.

[0081] In one embodiment, based on the preset maximum test ratio and the remaining online duration of the application, determining the statement test ratio includes:

[0082] In the case that the remaining online duration of the application is greater than the preset duration threshold, taking the preset maximum test ratio as the statement test ratio;

[0083] In the case that the remaining online duration of the application is not greater than the preset duration threshold, based on the test ratio determination function, the preset maximum test ratio, and the remaining online duration of the application, determining the statement test ratio.

[0084] Specifically, the calculation formula for the statement test ratio is as follows:

[0085] ,

[0086] where N is the statement test ratio, T is the remaining time until going live, in days, and Z is the preset maximum test ratio.

[0087] In this embodiment, when the remaining time until going live of the application has different values, how to determine the statement test ratio. By dynamically adjusting the statement test ratio, while ensuring the test quality, the test efficiency is improved, the risk of going live is reduced, and thus the flexibility and controllability of the entire software development and going live process are improved.

[0088] In one embodiment, the parameters involved in the first performance test result and the second performance test result are the same. The parameters involved include at least one of the amount of data processed by the database per second, the average execution time of the target structured query statement, or the database computing resources occupied; wherein, the database computing resources occupied include at least one of the central processing unit resources occupied, the memory resources occupied, or the hard disk resources occupied.

[0089] Among them, the amount of data processed by the database per second is TPS (Transactions Per Second).

[0090] In this embodiment, ensuring that the parameters involved in the first performance test result and the second performance test result are the same can ensure the accuracy of the performance test result, and can involve more than one type of parameter, ensuring the stability of the performance test.

[0091] Here, the data migration performance test method provided by the present application is described in detail by way of a specific embodiment. The implementation process of the data migration performance test method includes:

[0092] Obtain the condition weight corresponding to each structured query statement executed by the application in the database to be migrated, and the performance parameters corresponding to each structured query statement within a preset time period.

[0093] The parameters involved in the conditional weight include business scenario, business nature, table data volume, and table nature. Specifically, the types of business scenarios include key customer-facing scenarios, general customer-facing scenarios, key internal scenarios, and general internal scenarios, with corresponding weight values of 20%, 15%, 10%, and 5% respectively; the types of business nature include online services and batch services, with corresponding weight values of 30% and 5% respectively; among them, online services are real-time or near-real-time services, and batch services are asynchronous non-real-time services; the types of table data volume correspond to the data volume range, and the data volume ranges are greater than 100 million, not greater than 100 million and greater than 10 million, not greater than 10 million and greater than 1 million, not greater than 1 million, with corresponding weight values of 30%, 15%, 10%, and 5% respectively; the types of table nature include data hot spot data tables, database log tables, database general data tables, and database parameter tables, with corresponding weight values of 20%, 15%, 10%, and 5% respectively.

[0094] The performance parameters include execution time-consuming parameter, execution frequency parameter, execution computing resource parameter, and the number of rows of table data executed. The execution time-consuming parameter is the average time-consuming. Multiply the central processing unit resource occupancy by 70% and the hard disk resource occupancy by 30% as the execution computing resource parameter.

[0095] Take the product result among the conditional weight, performance parameter, and preset adjustment parameter as the priority value of the corresponding structured query statement. It should be noted that not all structured query statements need to calculate the corresponding priority value. Structured query statements that do not require performance testing can be set in advance manually, that is, the conditional weight and performance parameter corresponding to these structured query statements do not need to be obtained.

[0096] Sort each structured query statement in descending order of the priority value, and select the structured query statement ranked at the top based on the statement test ratio as the target structured query statement.

[0097] Conduct performance testing on the target structured query statement in the database to be migrated to obtain the first performance test result; screen out the target structured query statement in the target database for performance testing to obtain the second performance test result; among them, the parameters involved in the first performance test result and the second performance test result are the same, and the parameters involved include the amount of data processed per second by the database, the average execution time-consuming of the target structured query statement, the central processing unit resource occupancy, the memory resource occupancy, and the hard disk resource occupancy; when the decrease ratio of the second performance test result compared with the first performance test result is not greater than the preset ratio, for example, 20%, it is determined that the performance test for migrating from the database to be migrated to the target database passes.

[0098] The data migration performance testing method provided in this embodiment determines the target structured query statement based on the priority value of each structured query statement in the application and the remaining time until the application goes live. Then, performance testing is performed on the database to be migrated and the target database respectively based on the target structured query statement. The obtained data migration result has high accuracy. Moreover, it considers the priority value of the structured query statement rather than the structured query statement corresponding to the key transaction scenario, ensuring the stability of the performance testing. Considering the remaining time until the application goes live, the testing ratio of the structured query statement is adjusted based on the remaining time until the application goes live to ensure that the performance testing can be completed on time, further improving the stability of the performance testing.

[0099] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same moment, but can be executed at different moments. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.

[0100] Based on the same inventive concept, the embodiment of the present application also provides a data migration performance testing device for implementing the above-mentioned data migration performance testing method. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the data migration performance testing device provided below can refer to the limitations on the data migration performance testing method in the above text, and will not be repeated here.

[0101] See Figure 3 , Figure 3 FIG. is a structural block diagram of a data migration performance testing device provided in an embodiment of the present application. The device 300 includes: a parameter acquisition module 301, a priority value determination module 302, a target statement determination module 303, a first test result acquisition module 304, a second test result acquisition module 305, and a migration result determination module 306, where:

[0102] The parameter acquisition module 301 is configured to acquire the condition weight corresponding to each structured query statement executed by the application in the database to be migrated, and the performance parameter corresponding to each structured query statement within a preset time period;

[0103] A priority value determination module 302, configured to determine a priority value of a corresponding structured query statement based on a conditional weight and a performance parameter;

[0104] A target statement determination module 303, configured to determine a target structured query statement based on the priority value and the remaining time until the application goes live;

[0105] A first test result acquisition module 304, configured to perform a performance test on the target structured query statement in the database to be migrated to obtain a first performance test result;

[0106] A second test result acquisition module 305, configured to screen out the target structured query statement in the target database for performance testing to obtain a second performance test result;

[0107] A migration result determination module 306, configured to determine a data migration result from the database to be migrated to the target database by using a comparison result between the first performance test result and the second performance test result.

[0108] The data migration performance testing device provided in this embodiment determines the priority value of a corresponding structured query statement by using the conditional weight corresponding to each structured query statement executed by the application in the database to be migrated and the performance parameter corresponding to each structured query statement within a preset time period, determines the target structured query statement based on the priority value and the remaining time until the application goes live, performs performance testing on the target structured query statement in the database to be migrated and the target database to obtain a first performance test result and a second performance test result, and thus determines the data migration result from the database to be migrated to the target database. Compared with the problem of low stability of performance testing caused by using the key transaction data coverage principle in the traditional technology, in this embodiment, the target structured query statement is determined based on the priority value of each structured query statement in the application and the remaining time until the application goes live, and then performance testing is respectively performed on the database to be migrated and the target database based on the target structured query statement, so that the obtained data migration result is relatively accurate, and the priority value of the structured query statement is considered instead of the structured query statement corresponding to the key transaction scenario, ensuring the stability of performance testing.

[0109] Optionally, the parameters involved in the conditional weight include at least one of a business scenario, a business nature, a table data volume, or a table nature; the performance parameter includes at least one of an execution time-consuming parameter, an execution frequency parameter, an execution computing resource parameter, or an execution table data row number; wherein, the execution time-consuming parameter includes at least one of an average time-consuming, a median time-consuming, a maximum time-consuming, or a preset digit time-consuming, and the execution computing resource parameter is determined based on the occupied central processing unit resource and the occupied hard disk resource.

[0110] Optionally, the migration result determination module 306 is further configured to determine that the performance test for migrating from the database to be migrated to the target database passes when the decrease ratio of the second performance test result compared to the first performance test result is not greater than the preset ratio.

[0111] Optionally, the priority value determination module 302 includes:

[0112] The priority value determination unit is configured to use the product result among the condition weight, the performance parameter, and the preset adjustment parameter as the priority value of the corresponding structured query statement.

[0113] Optionally, the target statement determination module 303 includes:

[0114] The test ratio determination unit is configured to determine the statement test ratio based on the preset highest test ratio and the remaining online duration of the application;

[0115] The target statement determination unit is configured to sort each structured query statement in descending order of the priority value, and select the structured query statements ranked ahead based on the statement test ratio as the target structured query statements.

[0116] Optionally, the test ratio determination unit is further configured to use the preset highest test ratio as the statement test ratio when the remaining online duration of the application is greater than the preset duration threshold;

[0117] When the remaining online duration of the application is not greater than the preset duration threshold, determine the statement test ratio based on the test ratio determination function, the preset highest test ratio, and the remaining online duration of the application.

[0118] Optionally, the parameters involved in the first performance test result and the second performance test result are the same, and the parameters involved include at least one of the amount of data processed per second by the database, the average execution time of the target structured query statement, or the computing resources occupied by the database; wherein, the computing resources occupied by the database include at least one of the central processing unit resources occupied, the memory resources occupied, or the hard disk resources occupied.

[0119] Each module in the above data migration performance test device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor in the computer device in hardware form or independent of it, or stored in the memory in the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.

[0120] In one embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 4As shown in the figure. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a data migration performance test method. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.

[0121] Those skilled in the art can understand that Figure 4 the structure shown in the figure is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0122] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, it implements the steps of the data migration performance test method provided in the above embodiment:

[0123] Obtain the condition weight corresponding to each structured query statement executed by the application program in the database to be migrated, and the performance parameter corresponding to each structured query statement within a preset time period;

[0124] Based on the condition weight and the performance parameter, determine the priority value of the corresponding structured query statement;

[0125] Based on the priority value and the remaining online duration of the application program, determine the target structured query statement;

[0126] Perform a performance test on the target structured query statement in the database to be migrated to obtain a first performance test result;

[0127] Filter out the target structured query statements in the target database for performance testing to obtain the second performance test result;

[0128] Use the comparison result of the first performance test result and the second performance test result to determine the data migration result migrated from the database to be migrated to the target database.

[0129] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0130] The parameters involved in the conditional weight include at least one of the business scenario, business nature, table data volume, or table nature; the performance parameters include at least one of the execution time-consuming parameter, execution frequency parameter, execution computing resource parameter, or the number of table data rows; wherein, the execution time-consuming parameter includes at least one of the average time-consuming, median time-consuming, maximum time-consuming, or preset-digit time-consuming, and the execution computing resource parameter is determined based on the occupied central processing unit resources and the occupied hard disk resources.

[0131] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0132] When the decrease ratio of the second performance test result compared to the first performance test result is not greater than the preset ratio, it is determined that the performance test for migrating from the database to be migrated to the target database passes.

[0133] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0134] Take the product result among the conditional weight, performance parameter, and preset adjustment parameter as the priority value of the corresponding structured query statement.

[0135] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0136] Determine the statement test ratio based on the preset highest test ratio and the remaining online time of the application;

[0137] Sort each structured query statement in descending order of the priority value, and select the structured query statement ranked at the front based on the statement test ratio as the target structured query statement.

[0138] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0139] When the remaining online time of the application is greater than the preset time threshold, take the preset highest test ratio as the statement test ratio;

[0140] When the remaining online duration of the application program is not greater than the preset duration threshold, determine the statement test ratio based on the test ratio determination function, the preset maximum test ratio, and the remaining online duration of the application program.

[0141] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0142] The parameters involved in the first performance test result and the second performance test result are the same. The parameters involved include at least one of the amount of data processed by the database per second, the average execution time of the target structured query statement, or the database computing resources occupied. Among them, the database computing resources occupied include at least one of the central processing unit resources occupied, the memory resources occupied, or the hard disk resources occupied.

[0143] The implementation principle and technical effects of the above embodiments are similar to those of the above method embodiments, and will not be elaborated here.

[0144] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the data migration performance test method provided in the above embodiment are implemented:

[0145] Obtain the condition weight corresponding to each structured query statement executed by the application program in the database to be migrated, and the performance parameter corresponding to each structured query statement within a preset time period;

[0146] Based on the condition weight and the performance parameter, determine the priority value of the corresponding structured query statement;

[0147] Based on the priority value and the remaining online duration of the application program, determine the target structured query statement;

[0148] Perform a performance test on the target structured query statement in the database to be migrated to obtain the first performance test result;

[0149] Screen out the target structured query statement in the target database for performance testing to obtain the second performance test result;

[0150] Use the comparison result of the first performance test result and the second performance test result to determine the data migration result from the database to be migrated to the target database.

[0151] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0152] The parameters related to the conditional weight include at least one of the business scenario, business nature, table data volume, or table nature; the performance parameters include at least one of the execution time-consuming parameter, execution frequency parameter, execution computing resource parameter, or the number of rows of the execution table data; wherein, the execution time-consuming parameter includes at least one of the average time-consuming, median time-consuming, maximum time-consuming, or preset-digit time-consuming, and the execution computing resource parameter is determined based on the occupied central processing unit resources and occupied hard disk resources.

[0153] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0154] When the decrease ratio of the second performance test result compared to the first performance test result is not greater than the preset ratio, it is determined that the performance test for migrating from the database to be migrated to the target database passes.

[0155] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0156] The product result among the conditional weight, performance parameter, and preset adjustment parameter is used as the priority value of the corresponding structured query statement.

[0157] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0158] Based on the preset highest test ratio and the remaining online time of the application program, the statement test ratio is determined;

[0159] Sort each structured query statement in descending order based on the priority value, and select the structured query statement ranked at the front based on the statement test ratio as the target structured query statement.

[0160] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0161] When the remaining online time of the application program is greater than the preset time threshold, the preset highest test ratio is used as the statement test ratio;

[0162] When the remaining online time of the application program is not greater than the preset time threshold, based on the test ratio determination function, preset highest test ratio, and remaining online time of the application program, the statement test ratio is determined.

[0163] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0164] The parameters involved in the first performance test result and the second performance test result are the same. The parameters include at least one of the amount of data processed by the database per second, the average execution time of the target structured query statement, or the computing resources occupied by the database; among them, the computing resources occupied by the database include at least one of the central processing unit resources occupied, the memory resources occupied, or the hard disk resources occupied.

[0165] The implementation principles and technical effects of the above embodiments are similar to those of the above method embodiments, and will not be elaborated here.

[0166] In one embodiment, a computer program product is provided, including a computer program, which when executed by a processor, implements the steps of the data migration performance test method provided in the above embodiments:

[0167] Obtain the condition weight corresponding to each structured query statement executed by the application program in the database to be migrated, and the performance parameters corresponding to each structured query statement within a preset time period;

[0168] Based on the condition weight and performance parameters, determine the priority value of the corresponding structured query statement;

[0169] Based on the priority value and the remaining time before the application goes live, determine the target structured query statement;

[0170] Perform a performance test on the target structured query statement in the database to be migrated to obtain a first performance test result;

[0171] Screen out the target structured query statement in the target database for performance testing to obtain a second performance test result;

[0172] Use the comparison result of the first performance test result and the second performance test result to determine the data migration result from the database to be migrated to the target database.

[0173] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented:

[0174] The parameters involved in the condition weight include at least one of the business scenario, business nature, table data volume, or table nature; the performance parameters include at least one of the execution time parameter, execution frequency parameter, execution computing resource parameter, or the number of table data rows; among them, the execution time parameter includes at least one of the average time, median time, maximum time, or preset digit time, and the execution computing resource parameter is determined based on the central processing unit resources occupied and the hard disk resources occupied.

[0175] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented:

[0176] When the decrease ratio of the second performance test result compared to the first performance test result is not greater than a preset ratio, it is determined that the performance test for migrating from the database to be migrated to the target database passes.

[0177] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0178] Take the product result among the conditional weight, the performance parameter, and the preset adjustment parameter as the priority value of the corresponding structured query statement.

[0179] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0180] Determine the statement test ratio based on the preset highest test ratio and the remaining online duration of the application.

[0181] Sort each structured query statement in descending order according to the priority value, and select the structured query statements ranked ahead based on the statement test ratio as the target structured query statements.

[0182] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0183] When the remaining online duration of the application is greater than the preset duration threshold, take the preset highest test ratio as the statement test ratio.

[0184] When the remaining online duration of the application is not greater than the preset duration threshold, determine the statement test ratio based on the test ratio determination function, the preset highest test ratio, and the remaining online duration of the application.

[0185] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0186] The parameters involved in the first performance test result and the second performance test result are the same, and the parameters involved include at least one of the amount of data processed per second by the database, the average execution time of the target structured query statement, or the computing resources occupied by the database; wherein, the computing resources occupied by the database include at least one of the resources occupied by the central processing unit, the memory resources, or the hard disk resources.

[0187] The implementation principles and technical effects of the above embodiments are similar to those of the above method embodiments, and will not be elaborated here.

[0188] It should be noted that the data involved in this application (including but not limited to the data for analysis, stored data, displayed data, etc.) are all data authorized by users or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.

[0189] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memories can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.

[0190] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.

[0191] The above-described embodiments only represent several implementation manners of the present application. Their descriptions are relatively specific and detailed, but they should not be construed as limiting the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A data migration performance testing method, characterized in that: The method comprises: Obtaining the condition weight corresponding to each structured query statement executed by the application in the database to be migrated, and the performance parameter corresponding to each structured query statement within a preset time period; Determining a priority value of a corresponding structured query statement based on the condition weight and the performance parameter; Determining a target structured query statement based on the priority value and the remaining online time of the application program; Performing a performance test on the target structured query statement in the database to be migrated to obtain a first performance test result; Filtering the target structured query statement in the target database for performance testing to obtain a second performance testing result; The data migration result from the database to be migrated to the target database is determined by comparing the first performance test result with the second performance test result.

2. The method according to claim 1, characterized in that: The parameters involved in the conditional weight include at least one of the business scenario, business nature, table data volume or table nature; the performance parameters include at least one of the execution time parameter, execution frequency parameter, execution computing resource parameter or the number of execution table data rows; wherein, the execution time parameter includes at least one of the average time, median time, maximum time or preset median time, and the execution computing resource parameter is determined based on the occupied central processing unit resources and the occupied hard disk resources.

3. The method according to claim 1, characterized in that The determining the data migration result from the database to be migrated to the target database by comparing the first performance test result with the second performance test result includes: When the decrease ratio of the second performance test result compared with the first performance test result is not greater than a preset ratio, it is determined that the performance test of migrating from the database to be migrated to the target database has passed.

4. The method according to claim 1, characterized in that: The determining the priority value of the corresponding structured query statement based on the condition weight and the performance parameter includes: The product of the condition weight, the performance parameter and the preset adjustment parameter is used as the priority value of the corresponding structured query statement.

5. The method according to claim 1, characterized in that The determining of a target structured query statement based on the priority value and the remaining online time of the application program includes: Determining a statement test ratio based on a preset maximum test ratio and the remaining online time of the application; The structured query statements are sorted from large to small according to the priority value, and the structured query statement ranked first is selected as the target structured query statement based on the statement test ratio.

6. The method according to claim 5, characterized in that The determining of the statement test ratio based on the preset maximum test ratio and the remaining online time of the application program includes: When the remaining online time of the application is greater than a preset time threshold, a preset maximum test ratio is used as the statement test ratio; When the remaining online time of the application is not greater than a preset time threshold, the statement test ratio is determined based on the test ratio determination function, the preset maximum test ratio and the remaining online time of the application.

7. The method according to claim 1, characterized in that The parameters involved in the first performance test result and the second performance test result are the same, and the parameters involved include the amount of data processed per second by the database, the average execution time of the target structured query statement, or at least one of the database computing resources occupied; wherein the database computing resources occupied include at least one of the central processing unit resources occupied, the memory resources occupied, or the hard disk resources occupied.

8. A data migration performance testing device, characterized in that: The device comprises: A parameter acquisition module, used to acquire the condition weight corresponding to each structured query statement executed by the application in the database to be migrated, and the performance parameter corresponding to each structured query statement within a preset time period; A priority value determination module, used to determine the priority value of the corresponding structured query statement based on the condition weight and the performance parameter; A target statement determination module, configured to determine a target structured query statement based on the priority value and the remaining online time of the application program; A first test result acquisition module, configured to perform a performance test on the target structured query statement in the database to be migrated to obtain a first performance test result; A second test result acquisition module, used to filter out the target structured query statement in the target database for performance testing to obtain a second performance test result; The migration result determination module is used to determine the data migration result from the to-be-migrated database to the target database by using the comparison result of the first performance test result and the second performance test result.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Database index optimization method and device, computer equipment, readable storage medium and program product

    CN121542269A