Database performance monitoring method and apparatus, electronic device, and storage medium

By recording and standardizing the process data of data query requests, target evaluation data and attributes are generated, which solves the problems of low efficiency and poor accuracy of database performance monitoring in existing technologies, realizes timely and efficient database performance maintenance, and reduces cost waste.

CN114564354BActive Publication Date: 2025-12-05AGRICULTURAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210176084.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-25
Publication Date
2025-12-05
Estimated Expiration
2042-02-25

AI Technical Summary

Technical Problem

Existing technologies rely on manual queries of SQL statements and determining monitoring results based on the relationship between performance parameters and baseline thresholds. This results in low efficiency, high cost, and poor accuracy in database performance monitoring, making it impossible to perform timely and effective database performance maintenance.

Method used

By recording and standardizing the process data of data query requests to obtain target evaluation data, and processing the process data of each configuration item to be evaluated to generate target evaluation attributes, the target evaluation data and attributes are finally associated and displayed. Compared with the technical means of the embodiments in the prior art, this embodiment solves the problems of low monitoring efficiency, high cost, and poor accuracy of monitoring results caused by manually querying SQL statements and determining monitoring results based on the relationship between a performance parameter and a benchmark threshold. It realizes the standardization of the process data generated when processing data query requests to obtain target evaluation data for process evaluation, and then determines the target evaluation attributes based on the process data corresponding to each configuration item to be evaluated in the target evaluation data, thereby improving the accuracy of monitoring results. At the same time, the target evaluation data and application display improve the timeliness and intuitiveness of database performance monitoring, achieving the technical effect of timely and efficient database performance maintenance and reducing cost waste.

Benefits of technology

It improves the timeliness and accuracy of database performance monitoring, reduces cost waste, and enables timely and efficient database performance maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114564354B_ABST
    Figure CN114564354B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a database performance monitoring method and device, electronic equipment and a storage medium. The method comprises: when a data query request is received, recording process data generated when the data query request is processed; performing standardized processing on the process data to obtain target evaluation data; processing process data corresponding to each to-be-evaluated configuration item in the target evaluation data to obtain target evaluation attributes; and associating and displaying the target evaluation data and the target evaluation attributes. The method solves the problem of low monitoring efficiency, high cost and poor accuracy of monitoring results in the prior art, which is caused by manual query of SQL statements and determination of monitoring results based on the relationship between a certain performance parameter and a benchmark threshold, and achieves the effects of improving the accuracy of monitoring result determination, improving the timeliness and intuitiveness of database performance monitoring, timely and efficient performance maintenance of the database, and cost reduction.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to computer processing technology, and particularly relate to a database performance monitoring method and device, electronic equipment and storage medium. BACKGROUND

[0002] With the development of digital technology, the data in the information system is becoming more and more huge, and in the process of data processing, it is usually necessary to use a database processing system such as SQL (Structured Query Language) for data processing. It is fast and convenient to use SQL for data processing. However, if the database system is abnormal, it will greatly affect the processing efficiency of the enterprise system, and thus the cost loss, so the monitoring of the database processing performance is more and more important.

[0003] At present, the method for monitoring the performance of the database in the prior art is usually to manually query the SQL statements and the corresponding execution process data by the developer, and after obtaining the process data of a SQL statement, the performance parameters in the process data are extracted, and when the data of a performance parameter exceeds the benchmark threshold, the user is prompted. However, in the database application, with the development of business, there will be a large number of and complex SQL statements, and the performance parameters are also more and more rich. This way of manually querying the SQL statements and determining the monitoring result based on the relationship between a performance parameter and a benchmark threshold not only has low efficiency and high labor cost, but also has very low accuracy of the monitoring result determination, so that the database cannot be maintained in time and accurately, and the cost loss problem is caused. SUMMARY

[0004] Embodiments of the present application provide a database performance monitoring method, device, electronic equipment and storage medium to realize improving the accuracy of the monitoring result determination, improving the timeliness and intuitiveness of the database performance monitoring, achieving timely and efficient performance maintenance of the database, and reducing the cost waste effect.

[0005] In a first aspect, the embodiments of the present application provide a database performance monitoring method, which comprises:

[0006] When a data query request is received, record the process data generated when the data query request is processed;

[0007] The process data is normalized to obtain target evaluation data for process evaluation;

[0008] The process data corresponding to each to-be-evaluated configuration item in the target evaluation data is processed to obtain a target evaluation attribute;

[0009] The target evaluation data and the target evaluation attribute are associated and displayed.

[0010] In a second aspect, an embodiment of the present application further provides a database performance monitoring device, which comprises:

[0011] A process data recording module is configured to record process data generated when a data query request is processed upon receiving the data query request.

[0012] A target evaluation data determining module is configured to normalize the process data to obtain target evaluation data for process evaluation.

[0013] A target evaluation attribute determining module is configured to process process data corresponding to each to-be-evaluated configuration item in the target evaluation data to obtain a target evaluation attribute.

[0014] An associated display module is configured to associate and display the target evaluation data and the target evaluation attribute.

[0015] In a third aspect, an embodiment of the present application further provides an electronic device, which comprises:

[0016] One or more processors;

[0017] A storage device configured to store one or more programs,

[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement the database performance monitoring method according to any of the embodiments of the present application.

[0019] In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium having a computer program stored thereon, which is executed by a processor to implement the database performance monitoring method according to any of the embodiments of the present application.

[0020] The technical scheme of the embodiment of the present application records the process data generated when the data query request is processed when the data query request is received, and then performs standardized processing on the process data to obtain target evaluation data for process evaluation, and then processes the process data corresponding to each to-be-evaluated configuration item in the target evaluation data to obtain target evaluation attributes, and associates and displays the target evaluation data and the target evaluation attributes, thereby solving the problem in the prior art that the monitoring result is determined by manual query of the SQL statement and based on the relationship between a certain performance parameter and a benchmark threshold, resulting in low monitoring efficiency, high cost, and poor accuracy of the monitoring result determination, and achieving the technical effects of obtaining target evaluation data for process evaluation based on the standardized processing of the process data generated when the data query request is processed, then determining target evaluation attributes based on the process data corresponding to each to-be-evaluated configuration item in the target evaluation data, improving the accuracy of the monitoring result determination, and associating and displaying the target evaluation data and the target evaluation attributes to improve the timeliness and intuitiveness of the database performance monitoring, achieve timely and efficient performance maintenance of the database, and reduce cost waste. BRIEF DESCRIPTION OF DRAWINGS

[0021] In order to more clearly illustrate the technical scheme of the exemplary embodiments of the present application, the drawings needed in the description of the embodiments are briefly introduced as follows. Obviously, the drawings introduced are only a part of the drawings of the embodiments to be described by the present application, and not all the drawings. Those skilled in the art can obtain other drawings from these drawings without creating any creative labor.

[0022] Figure 1 A flowchart of a database performance monitoring method provided by the first embodiment of the present application;

[0023] Figure 2 A schematic diagram of a database performance monitoring method provided by the second embodiment of the present application;

[0024] Figure 3 A structural block diagram of a database performance monitoring device provided by the third embodiment of the present application;

[0025] Figure 4 A structural schematic diagram of an electronic device provided by the fourth embodiment of the present application. DETAILED DESCRIPTION

[0026] The present application will be further described in detail below in combination with the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present application, and not to limit the present application. In addition, it should be noted that, in order to facilitate the description, only the parts related to the present application are shown in the drawings, not all the structures.

[0027] Embodiment one

[0028] Figure 1 A flow chart of a database performance monitoring method provided by Embodiment one of the present application, the embodiment can be applied to the case of monitoring database performance, the method can be executed by the database performance monitoring device in the embodiment of the present application, the device can be realized in the form of software and / or hardware, and can be realized by an electronic device, which can be a mobile terminal, a PC terminal or a server, etc. The device can be configured in a computing device, and the database performance monitoring method provided by the embodiment includes the following steps:

[0029] S110, when receiving a data query request, record the process data generated when processing the data query request.

[0030] The process data can be understood as execution data generated when executing a request operation, such as execution time, read request time, data volume queried, etc., and the request operation can be an operation of adding, deleting, changing or querying data.

[0031] In actual application, it can be considered that a data query request is received when a user triggers a certain control on a client page by using an input device. For example, the data query request can be a select request corresponding to data query, a delete request corresponding to data deletion, an insert request corresponding to data addition, or an update request corresponding to data change, and the input device can include at least one of a physical keyboard, a virtual keyboard, a sound collection device, a handwriting device and a touch screen. At this time, a series of execution data generated when executing the data query request operation can be recorded as process data.

[0032] It should be noted that when receiving a data query request, the process data generated when processing the data query request can also be recorded by setting a mechanism for tracking the execution process of the data query request when receiving the data query request, and all process data generated when processing the data query request can be accurately and conveniently recorded based on the tracking mechanism.

[0033] Optionally, when receiving a data query request, recording the process data generated when processing the data query request includes: when receiving a data query request generated based on a user's trigger operation, tracking the execution process of the data query request, and recording the process data generated when processing the data query request.

[0034] In the embodiment, when a user triggers a certain control on a client page by using an input device, a request for operating a database, i.e., a data query request, is generated, and the execution process of the data query request is tracked by using a data collection tool, and process data generated when the data query request is processed is recorded. For example, in actual application, when a data query request is received, an SQL statement in the data query request to be executed is transmitted into a preset tracking script as a parameter, and sql_trace (data collection tool) in the script is started to track the execution process of the SQL statement. After the SQL statement is executed, a tracking file (trace file) recording process data is generated in the script, and it can be considered that process data generated when the data query request is processed is obtained.

[0035] In S120, the process data is normalized to obtain target evaluation data for process evaluation.

[0036] The target evaluation data can be understood as parameter data for evaluating database performance. Optionally, the target evaluation data can include, but is not limited to, tracking duration, processor processing duration, physical read times, query data record number, query data block number, and changed data block number.

[0037] It should be noted that the original trace file recorded based on sql_trace (data collection tool) does not have formatted data information, and the readability is poor. In order to improve the accuracy of database performance monitoring, the trace file can be converted into a normalized file format by using a TKPROF (Trace Kernel Profile, tracking kernel configuration file) tool provided by Oracle (Oracle Database, relational database), the complexity of the trace file is reduced, the trace file is easy to understand and view, and the database performance is evaluated based on the converted normalized file data, and the evaluation accuracy is improved.

[0038] Specifically, after the trace file recording process data is obtained, the process data in the trace file can be normalized by using a TKPROF tool, and a trace file with high readability is obtained. For example, the normalization processing can be extraction processing, and data for evaluating database performance can be extracted from the process data as target evaluation data, so that the process performance of the database can be evaluated based on the target evaluation data.

[0039] It should be noted that before the process data is extracted to obtain the target evaluation data for process evaluation, a plurality of SQL performance parameters can be pre-set according to actual requirements to accurately evaluate the database performance, so that after the process data is obtained, the data matched with the pre-set parameters can be extracted from the process data as the target evaluation data for evaluating the database performance.

[0040] Optionally, the process data is normalized to obtain the target evaluation data for process evaluation, including: normalizing the process data based on at least one pre-set configuration item to obtain the target evaluation data.

[0041] The pre-set configuration item can be understood as a pre-set parameter information for evaluating the database performance, for example, the pre-set configuration item can be a tracking duration or a physical read number.

[0042] In actual application, the TKPROF tool can be used to normalize the trace file containing process data. For example, the process data can be extracted based on preset configuration items to obtain process data containing database performance evaluation parameters as target evaluation data, and a trace file with high readability is obtained. It should be noted that the trace file processed by the TKPROF tool can contain processing data of three parts of each SQL statement, i.e., parse, execute and fetch. The parse step is to convert the SQL statement into an execution plan, such as checking whether there is correct authorization and whether the required tables, columns and other referenced objects exist. The execute step is the real execution of the statement by Oracle. For insert, update and delete operations, this step modifies the data. For select operation, this step only determines the selected records. The fetch step is to return the records obtained in the query statement. This step is only executed for select statements. Further, in the normalized trace file, the analysis of each SQL statement can be seen, such as the number of times each SQL statement is parsed, executed and fetched; the cpu (central processing unit) time consumed by each SQL statement in parse, execute and fetch, in seconds; the total time consumed by each SQL statement in parse, execute and fetch; the number of blocks physically read from the data file on the disk; the number of buffers obtained by each SQL statement in parse, execute and fetch in consistent read mode, wherein the buffer in consistent mode is used to provide a consistent read snapshot for a long-running transaction, and the cached state is stored in the head; the number of buffers obtained in current mode, wherein if new buffers are found in the cache area to give the current transaction enough to use, these buffers will be read into the cache area; the number of records returned by each SQL statement, wherein for select statements, the returned records are in the fetch step, and for insert, update and delete operations, the returned records are in the execute step. Correspondingly, the process data in the normalized trace file can be used as target evaluation data.

[0043] S130, processing the process data corresponding to each to-be-evaluated configuration item in the target evaluation data to obtain a target evaluation attribute.

[0044] In actual application, after obtaining the target evaluation data, each performance evaluation parameter in the target evaluation data can be taken as a to-be-evaluated configuration item, such as the tracking time length, the processor processing time length, the physical read frequency, the query data record number, the query data block number, the changed data block number, and the like. At this time, the process data corresponding to each to-be-evaluated configuration item can be evaluated and processed, such as comparison processing, comparison of each process data with preset threshold data, judgment of whether each process data is abnormal, and obtaining of an evaluation result, that is, the target evaluation attribute can be considered to be obtained. In order to improve the accuracy of the evaluation result determination, the process data corresponding to each to-be-evaluated configuration item can also be input into a pre-trained performance evaluation model, and each process data is processed based on an evaluation function in the performance evaluation model to output an evaluation result as the target evaluation attribute.

[0045] In actual application, after obtaining the target evaluation data, the target evaluation data at this time also contains the trace file after the normalization processing, and accordingly, the target evaluation data in the trace file can be parsed to obtain each to-be-evaluated configuration item and the corresponding process data in the target evaluation data, so as to evaluate the database performance based on the process data corresponding to each to-be-evaluated configuration item.

[0046] Optionally, the process data corresponding to each to-be-evaluated configuration item in the target evaluation data is processed to obtain the target evaluation attribute, including: parsing the target evaluation data to obtain at least one to-be-evaluated configuration item; and performing fusion processing on the process data corresponding to each to-be-evaluated configuration item to obtain the target evaluation attribute.

[0047] In this embodiment, the target evaluation data provided by the normalized trace file can be analyzed to obtain each to-be-evaluated configuration item information and the corresponding process data in the target evaluation data, and then the process data corresponding to each to-be-evaluated configuration item can be input into a pre-trained performance evaluation model, and each process data is fused and processed based on an evaluation function in the performance evaluation model. For example, the evaluation function can be Wherein, S can be represented as the target evaluation attribute; count can be represented as the number of times of execution of the SQL statement; elapsed can be represented as the total time length consumed in parse, execute, and fetch, that is, the tracking time length, which includes the cpu time length and the waiting time length; disk can be represented as the physical read frequency; row can be represented as the query data record number; query can be represented as the data block number read by the query statement; and current can be represented as the data block number read by the changed statement. Further, based on the evaluation function, the target evaluation attribute S can be output. It should be noted that in actual application, the setting of the evaluation function can be determined by the technical personnel according to the actual working condition, and the present technical solution is not limited in this regard.

[0048] It should be noted that the units of the process data corresponding to each to-be-evaluated configuration item are time or quantity. In order to improve the fusion accuracy, the process data can be normalized to obtain process data with consistent units, and then the process data corresponding to each to-be-evaluated configuration item is fused to obtain the target evaluation attribute.

[0049] Optionally, the process data corresponding to each to-be-evaluated configuration item is fused to obtain the target evaluation attribute, including: if the units of the process data corresponding to each to-be-evaluated configuration item are inconsistent, the process data is normalized to obtain processed process data; and the processed process data is fused to obtain the target evaluation attribute.

[0050] In actual application, the units of the process data corresponding to each to-be-evaluated configuration item can be compared. If the units are inconsistent, the process data can be normalized by using an algorithm to make the units of the process data consistent. Then, the normalized process data can be fused by using an algorithm to obtain the target evaluation attribute, thereby improving the accuracy of result determination.

[0051] It should be noted that in the scenario of database performance monitoring, if an exception is found, the corresponding exception condition can be notified to the developer, so that the developer can detect the database in time to avoid affecting the application and improve the timeliness of monitoring.

[0052] Optionally, after processing the at least one to-be-used configuration parameter in the target evaluation data to obtain the target evaluation attribute corresponding to the execution data, the method further includes: if the value in the target evaluation attribute exceeds a preset evaluation threshold, determining prompt information for process warning based on the target evaluation attribute and the corresponding target evaluation data.

[0053] In actual application, the value in the target evaluation attribute can be compared with the preset evaluation threshold in real time. When the value in the target evaluation attribute exceeds the preset evaluation threshold, the target evaluation attribute and the corresponding target evaluation data can be filled into a preset reminder form, and the filled reminder form can be used as the prompt information for process warning, so that the developer can quickly locate and detect the fault of the database based on the information on the form.

[0054] S140, associating and displaying the target evaluation data and the target evaluation attribute.

[0055] In the embodiment, after the target evaluation data and the corresponding target evaluation attribute are acquired, the two data can be pushed to the client for associated display. For example, a SQL performance display system can be developed in advance to intuitively display the target evaluation data and the corresponding target evaluation attribute on the front end of the system webpage. For example, a mapping table page can be used for display, for users to view, and to improve the intuitiveness and convenience of database performance monitoring.

[0056] It should be noted that when the value in the target evaluation attribute exceeds the preset evaluation threshold, an exception can occur, and accordingly, the prompt information determined based on the target evaluation attribute and the corresponding target evaluation data for process warning can also be pushed to the client for display. The prompt information can also be sent in the form of a short message, a voice, or an email to a device corresponding to the developer. In this way, the developer can intuitively and timely obtain the exception information, and the timeliness of monitoring can be improved.

[0057] Optionally, the target evaluation data and the target evaluation attribute are associated and displayed, including: pushing the target evaluation data, the target evaluation attribute, and the corresponding prompt information to the target device for associated display.

[0058] In actual application, if the value in the target evaluation attribute exceeds the preset evaluation threshold, the prompt information corresponding to the target evaluation attribute can be pushed to the target device together with the target evaluation attribute and the corresponding target evaluation data for associated display. Optionally, the prompt information can be a reminder form containing the target evaluation attribute and the corresponding target evaluation data. Alternatively, the prompt information can be a label prompt for the abnormal target evaluation attribute and the corresponding target evaluation data on the display screen of the target device, such as adding a warning sign, enlarging the font, changing the font color, highlighting, or the like.

[0059] The technical scheme of the embodiment records the process data generated when the data query request is processed when the data query request is received, then performs standardized processing on the process data to obtain target evaluation data for process evaluation, then processes the process data corresponding to each to-be-evaluated configuration item in the target evaluation data to obtain target evaluation attributes, and associates and displays the target evaluation data and the target evaluation attributes, thereby solving the problem in the prior art that the monitoring result is determined based on the relationship between a performance parameter and a benchmark threshold value through manual query of a SQL statement, which results in low monitoring efficiency, high cost, and poor accuracy of the monitoring result determination, and achieving the technical effects of obtaining target evaluation data for process evaluation based on standardized processing of the process data generated when the data query request is processed, then determining target evaluation attributes based on the process data corresponding to each to-be-evaluated configuration item in the target evaluation data, improving the accuracy of the monitoring result determination, associating and displaying the target evaluation data and the target evaluation attributes, improving the timeliness and intuitiveness of database performance monitoring, achieving timely and efficient performance maintenance of the database, and reducing cost waste.

[0060] Embodiment Two

[0061] As an optional embodiment of the above embodiment, Figure 2 A schematic diagram of a database performance monitoring method provided by Embodiment Two of the application is shown. Specifically, the specific content is described below.

[0062] Reference is made to Figure 2When receiving a data query request (SQL statement), the SQL statement to be executed is passed into the script as a parameter, and when the parameter identifier is detected, the sql_trace (data tracking tool) in the script is started. After executing the specific SQL, the process data generated when the SQL is processed based on the sql_trace record is used to generate a trace file, wherein the trace file contains process data. Since the original trace file has poor readability, the trace file can be converted into a standardized file format by using the TKPROF (Trace Kernel Profile) tool provided by oracle to obtain the standardized trace file. At the same time, the standardized trace file is parsed and data is extracted based on the preset configuration item. The preset configuration item can be the number of SQL statement executions (count, indicating how many times the current operation is executed), the tracking duration (elapsed, indicating the total duration of the current operation, including the cpu duration and the waiting duration), the processor processing duration (cpu, the duration of the current operation consuming cpu), the physical read number (disk, the physical read of the current operation), the query data record number (row, the data record number processed by the current operation), the read data block number (query¤t, the data block number read by the current operation, corresponding to the query data block number and the modified data block number, respectively), and the like. Further, the target evaluation data can be obtained,

[0063] On the basis of the above scheme, the target evaluation data provided by the trace file can be analyzed. Since the elapsed includes the cpu processing duration and the waiting duration, the cpu processing duration is no longer considered separately. The target evaluation data can be processed based on an evaluation function to obtain a target evaluation attribute. The evaluation function can be: Wherein, S can represent the target evaluation attribute; count can represent the number of SQL statement executions; elapsed can represent the total duration of parse, execute, and fetch, that is, the tracking duration, which includes the cpu duration and the waiting duration; disk can represent the physical read number; row can represent the query data record number; query can represent the data block number read by the query statement; current can represent the data block number read by the change statement; (count+elapsed+disk+query+current) totalThe sum of the process data corresponding to each to-be-evaluated configuration item, such as count, elapsed, disk, query, and current, can be represented. Further, the target evaluation attribute S can be output based on the evaluation function. It should be noted that if the units of the process data corresponding to each to-be-evaluated configuration item in the target evaluation data are different, the process data can be normalized, and then the normalized process data can be processed based on the evaluation function to obtain the target evaluation attribute.

[0064] Based on the above scheme, an SQL performance display system can be developed, and then the target evaluation data and the target evaluation attribute can be associated and intuitively displayed on the front end of the system webpage for the user to view.

[0065] The technical scheme of the embodiment records the process data generated when the data query request is processed when the data query request is received, and then normalizes the process data to obtain target evaluation data for process evaluation, and then processes the process data corresponding to each to-be-evaluated configuration item in the target evaluation data to obtain a target evaluation attribute, and associates and displays the target evaluation data and the target evaluation attribute, thereby solving the problem in the prior art that the monitoring result is determined based on the relationship between a performance parameter and a benchmark threshold value through manual query of an SQL statement, resulting in low monitoring efficiency, high cost, and poor accuracy of the monitoring result determination, and achieving the technical effects of normalizing the process data generated when the data query request is processed to obtain target evaluation data for process evaluation, and then determining a target evaluation attribute based on the process data corresponding to each to-be-evaluated configuration item in the target evaluation data, improving the accuracy of the monitoring result determination, and associating and displaying the target evaluation data and the target evaluation attribute to improve the timeliness and intuitiveness of database performance monitoring, achieving timely and efficient performance maintenance of the database, and reducing cost waste.

[0066] Embodiment Three

[0067] Figure 3 A structural block diagram of a database performance monitoring device provided in Embodiment Three of the present application. The device comprises a process data recording module 310, a target evaluation data determining module 320, a target evaluation attribute determining module 330, and an association and display module 340.

[0068] The process data recording module 310 is configured to record process data generated when the data query request is processed upon receiving the data query request; the target evaluation data determination module 320 is configured to normalize the process data to obtain target evaluation data for process evaluation; the target evaluation attribute determination module 330 is configured to process process data corresponding to each configuration item to be evaluated in the target evaluation data to obtain target evaluation attributes; and the association display module 340 is configured to display the target evaluation data and the target evaluation attributes in association.

[0069] The technical scheme of the embodiment records process data generated when a data query request is processed upon receiving the data query request, normalizes the process data to obtain target evaluation data for process evaluation, processes process data corresponding to each configuration item to be evaluated in the target evaluation data to obtain target evaluation attributes, and displays the target evaluation data and the target evaluation attributes in association, thereby solving the problem in the prior art that manual query of a SQL statement and determination of a monitoring result based on the relationship between a performance parameter and a benchmark threshold result in low monitoring efficiency, high cost, and poor accuracy of the monitoring result, and achieving the technical effects of normalizing process data generated when a data query request is processed to obtain target evaluation data for process evaluation, determining target evaluation attributes based on process data corresponding to each configuration item to be evaluated in the target evaluation data, improving the accuracy of the monitoring result, displaying the target evaluation data and the target evaluation attributes in association, improving the timeliness and intuitiveness of database performance monitoring, achieving timely and efficient performance maintenance of a database, and reducing cost waste.

[0070] On the basis of the above device, optionally, the process data recording module 310 comprises a process data recording unit.

[0071] The process data recording unit is configured to track the execution process of the data query request and record process data generated when the data query request is processed upon receiving the data query request generated based on a user's trigger operation.

[0072] On the basis of the above device, optionally, the target evaluation data determination module 320 comprises a target evaluation data determination unit.

[0073] The target evaluation data determination unit is configured to normalize the process data based on at least one preset configuration item to obtain target evaluation data.

[0074] On the basis of the above device, optionally, the target evaluation attribute determination module 330 comprises a configuration item to be evaluated determination unit and a target evaluation attribute determination unit.

[0075] a to-be-evaluated configuration item determination unit configured to parse the target evaluation data to obtain at least one to-be-evaluated configuration item;

[0076] a target evaluation attribute determination unit configured to perform fusion processing on process data corresponding to each to-be-evaluated configuration item to obtain a target evaluation attribute.

[0077] On the basis of the apparatus, optionally, the target evaluation attribute determination unit comprises a data normalization subunit and a target evaluation attribute determination subunit.

[0078] The data normalization subunit is configured to, if the units of the process data corresponding to each to-be-evaluated configuration item are inconsistent, perform normalization processing on each process data to obtain processed process data.

[0079] The target evaluation attribute determination subunit is configured to perform fusion processing on the processed process data to obtain the target evaluation attribute.

[0080] On the basis of the apparatus, optionally, the target evaluation attribute determination module 330 further comprises a prompt information determination unit.

[0081] The prompt information determination unit is configured to, if a value in the target evaluation attribute exceeds a preset evaluation threshold, determine prompt information for process early warning based on the target evaluation attribute and corresponding target evaluation data.

[0082] On the basis of the apparatus, optionally, the association display module 340 comprises an association display unit.

[0083] The association display unit is configured to push the target evaluation data, the target evaluation attribute and corresponding prompt information to a target device for association display.

[0084] The database performance monitoring apparatus provided in the embodiments of the present application can execute the database performance monitoring method provided in any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of the execution method.

[0085] It should be noted that each unit and module included in the apparatus is only divided according to the function logic, and is not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for convenient mutual distinction, and are not used to limit the protection scope of the embodiments of the present application.

[0086] Embodiment Four

[0087] Figure 4 A structural schematic diagram of an electronic device provided in Embodiment Four of the present application. Figure 4A block diagram is shown of an exemplary electronic device 40 suitable for implementing embodiments of the present invention. Figure 4 The electronic device 40 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.

[0088] like Figure 4 As shown, electronic device 40 is represented in the form of a general-purpose computing device. The components of electronic device 40 may include, but are not limited to: one or more processors or processing units 401, system memory 402, and bus 403 connecting different system components (including system memory 402 and processing unit 401).

[0089] Bus 403 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0090] Electronic device 40 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 40, including volatile and non-volatile media, removable and non-removable media.

[0091] System memory 402 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 404 and / or cache memory 405. Electronic device 40 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 406 may be used to read and write non-removable, non-volatile magnetic media (… Figure 4 Not shown; usually referred to as a "hard drive"). Although Figure 4 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 403 via one or more data media interfaces. Memory 402 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.

[0092] Program / utility 408, having a set of program modules 407, can be stored in memory 402 by way of example, and not limiting, as well as an operating system, one or more application programs, other program modules, and program data, each or some combination thereof, can include implementation of a networking environment. Program modules 407 generally carry out the functions and / or methodologies of embodiments of the application as described herein.

[0093] Electronic device 40 can also communicate with one or more external devices 409 such as a keyboard or a pointing device, displays 410, etc.; one or more devices that enable a user to interact with electronic device 40; and / or one or more devices that enable electronic device 40 to communicate with one or more other computing devices. Such communication can be via an input / output (I / O) interface 411. Still yet, electronic device 40 can communicate with one or more networks, such as one or more local area networks (LANs) ; one or more wide area networks (WANs) ; and / or one or more public networks, such as the Internet, via network adapter 412. As depicted, network adapter 412 communicates with the other components of electronic device 40 via bus 403. It should be appreciated that although not shown, other hardware and / or software modules could be used in conjunction with electronic device 40. Examples, include, but are not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc. Figure 4

[0094] Processing unit 401 executes various function applications and data processing by running programs stored in system memory 402, such as implementing the database performance monitoring method provided by embodiments of the present application.

[0095] Embodiment five

[0096] Embodiment five of the present application also provides a storage medium containing computer executable instructions, which when executed by a computer processor, are used to perform a database performance monitoring method. The method comprises:

[0097] Upon receiving a data query request, recording process data generated when processing the data query request;

[0098] Normalizing the process data to obtain target evaluation data for process evaluation;

[0099] Processing the process data corresponding to each to-be-evaluated configuration item in the target evaluation data to obtain a target evaluation attribute;

[0100] Associating and displaying the target evaluation data and the target evaluation attribute.​

[0101] The computer storage media of embodiments of the application can include any combination of one or more computer readable medium(s). The computer readable medium can be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium can be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.

[0102] A computer readable signal medium can include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal can take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium can be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.

[0103] Program code embodied on a computer readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0104] Computer program code for carrying out operations of embodiments of the application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider). In an embodiment of the application, electronic mail (email) can be used to perform some or all of the communication steps between the user and the application server.

[0105] Note that the above merely describes preferred embodiments of the application and the principles of the technology applied. Those skilled in the art will understand that the application is not limited to the specific embodiments described herein, and that various obvious changes, modifications and substitutions can be made to the application without departing from the scope of the application. Therefore, although the application has been described in detail by the above embodiments, the application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the application, and the scope of the application is determined by the appended claims.

Claims

1. A method of database performance monitoring, characterized by, The method comprises the following steps: When a data query request is received, process data generated when the data query request is processed is recorded; The process data is normalized to obtain target evaluation data for process evaluation; The process data corresponding to each to-be-evaluated configuration item in the target evaluation data is processed to obtain target evaluation attributes; the target evaluation attributes are obtained based on comparing each process data with preset threshold data or based on processing the process data by using a pre-trained performance evaluation model; the to-be-evaluated configuration item is each performance evaluation parameter in the target evaluation data; The target evaluation data and the target evaluation attributes are associated and displayed.

2. The method of claim 1, wherein, The step of recording the process data generated when the data query request is processed when the data query request is received comprises the following steps: When a data query request generated based on a user's triggering operation is received, the execution process of the data query request is tracked, and the process data generated when the data query request is processed is recorded.

3. The method of claim 1, wherein, The step of normalizing the process data to obtain target evaluation data for process evaluation comprises the following step: The process data is normalized based on at least one preset configuration item to obtain target evaluation data.

4. The method of claim 1, wherein, The step of processing the process data corresponding to each to-be-evaluated configuration item in the target evaluation data to obtain target evaluation attributes comprises the following steps: The target evaluation data is parsed to obtain at least one to-be-evaluated configuration item; The process data corresponding to each to-be-evaluated configuration item is fused to obtain target evaluation attributes, comprising the following step: the process data is fused based on an evaluation function in a performance evaluation model to obtain target evaluation attributes; wherein the evaluation function is: wherein S represents a target evaluation attribute; count represents the number of times the SQL statement is executed; elapsed represents a tracking duration, which includes a consumed cpu duration and a waiting duration; disk represents the number of physical reads; row represents the number of query data records; query represents the number of data blocks read by the query statement; and current represents the number of data blocks read by the change statement.

5. The method of claim 4, wherein, The step of fusing the process data corresponding to each to-be-evaluated configuration item to obtain target evaluation attributes comprises the following steps: If the units of the process data corresponding to each to-be-evaluated configuration item are inconsistent, the process data is normalized to obtain processed process data; The processed process data is fused to obtain target evaluation attributes.

6. The method of claim 1, wherein, After the target evaluation attributes are obtained, the following step is further included: If the value in the target evaluation attributes exceeds a preset evaluation threshold, prompt information for process warning is determined based on the target evaluation attributes and the corresponding target evaluation data.

7. The method of claim 6, wherein, The step of associating and displaying the target evaluation data and the target evaluation attributes comprises the following step: The target evaluation data, the target evaluation attributes, and the corresponding prompt information are pushed to a target device for associated display.

8. A database performance monitoring apparatus, characterized by comprising: The method comprises the following steps: A process data recording module is configured to record process data generated when a data query request is processed when the data query request is received; A target evaluation data determination module is configured to normalize the process data to obtain target evaluation data for process evaluation; The target evaluation attribute determination module is configured to process process data corresponding to each to-be-evaluated configuration item in the target evaluation data to obtain a target evaluation attribute; the target evaluation attribute is obtained based on comparison of each process data with preset threshold data or based on processing of the process data by a pre-trained performance evaluation model; and the to-be-evaluated configuration item is each performance evaluation parameter in the target evaluation data. The association display module is configured to display the target evaluation data and the target evaluation attribute in association.

9. An electronic device, comprising: The device includes: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the database performance monitoring method as claimed in any one of claims 1-7.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the database performance monitoring method as claimed in any one of claims 1-7.

Citation Information

Patent Citations

  • Testing efficiency and stability of a database query engine

    CN102362276A

  • Database performance bottleneck positioning analysis method, device and system and storage medium

    CN113886205A