CN112783732A - Database table capacity monitoring method and device - Google Patents

Database table capacity monitoring method and device Download PDF

Info

Publication number
CN112783732A
CN112783732A CN202110128401.5A CN202110128401A CN112783732A CN 112783732 A CN112783732 A CN 112783732A CN 202110128401 A CN202110128401 A CN 202110128401A CN 112783732 A CN112783732 A CN 112783732A
Authority
CN
China
Prior art keywords
database table
time node
current time
capacity
early warning
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110128401.5A
Other languages
Chinese (zh)
Other versions
CN112783732B (en
Inventor
乔波
陆照信
徐建斌
刘琨
张子君
葛志赟
何涛
张宁子
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202110128401.5A priority Critical patent/CN112783732B/en
Publication of CN112783732A publication Critical patent/CN112783732A/en
Application granted granted Critical
Publication of CN112783732B publication Critical patent/CN112783732B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/327Alarm or error message display
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof

Abstract

The application discloses a database table capacity monitoring method and device, comprising the following steps: collecting target information of a database table of a target time node; the target time node includes a current time node and a previous time node. And determining the maximum available capacity of the database table of the current time node and the type of the database table of the current time node according to the target information of the database table of the current time node. And determining the used capacity of the database table of the target time node according to the target information of the database table of the target time node. And calculating the capacity utilization rate of the database table of the current time node and the capacity growth rate of the database table according to the maximum available capacity of the database table of the current time node and the used capacity of the database table of the target time node. When the database table is determined to accord with the early warning condition according to the capacity utilization rate, the capacity growth rate and the type of the database table of the current time node, an early warning signal is generated, and the efficiency and the accuracy of monitoring the capacity of the database table are improved.

Description

Database table capacity monitoring method and device
Technical Field
The application relates to the technical field of computers, in particular to a database table capacity monitoring method and device.
Background
A large-scale bank in China constructs a core business system based on a large-scale host, and can meet business operation requirements after data is concentrated greatly. The data large set has strict requirements on the capacity of the database. The database contains tens of thousands of tables, each having the largest available space. Full capacity of any table may cause congestion in transactions throughout the core business system.
Currently, the capacity of a database table is monitored by calculating the usage of the database table and setting a threshold of the usage of the table. And when the utilization rate of the database table exceeds a utilization rate threshold value, generating an early warning signal, and carrying out corresponding treatment on the database table generating the early warning signal by technical personnel.
However, the database table is monitored only by the utilization rate of the database table, the accuracy is low, and false early warning can occur.
Disclosure of Invention
In order to solve the technical problem, the application provides a database table capacity monitoring method and device, which are used for monitoring the capacity of a database table from multiple dimensions so as to improve the efficiency and accuracy of database table capacity monitoring.
In order to achieve the above purpose, the technical solutions provided in the embodiments of the present application are as follows:
the embodiment of the application provides a database table capacity monitoring method, which comprises the following steps:
collecting target information of the database table of a target time node; the target information comprises application attribute information, record number and parameter information; the target time node comprises a current time node and a previous time node;
determining the maximum available capacity of the database table of the current time node and the type of the database table of the current time node according to the target information of the database table of the current time node;
determining the used capacity of the database table of the target time node according to the target information of the database table of the target time node;
calculating to obtain the capacity utilization rate of the database table of the current time node and the capacity growth rate of the database table of the current time node according to the maximum available capacity of the database table of the current time node and the used capacity of the database table of the target time node;
and generating an early warning signal when the database table meets the early warning condition according to the capacity utilization rate of the database table of the current time node, the capacity growth rate of the database table of the current time node and the type of the database table of the current time node.
Optionally, the types of the database tables include a fast table and a regular table; when the database table is determined to accord with the early warning condition according to the capacity utilization rate of the database table of the current time node, the capacity growth rate of the database table of the current time node and the type of the database table of the current time node, generating an early warning signal, including:
generating an early warning signal when the capacity utilization rate of the database table of the current time node exceeds a maximum capacity utilization rate threshold and/or the capacity growth rate of the database table of the current time node exceeds a maximum capacity growth rate threshold;
generating an early warning signal when the capacity utilization rate of the database table of the current time node accords with a preset capacity utilization range and the capacity growth rate of the database table of the current time node accords with a preset capacity growth range; the preset capacity utilization range is a range between a minimum capacity utilization threshold and a maximum capacity utilization threshold; the preset capacity increase range is a range between a minimum capacity increase rate threshold and a maximum capacity increase rate threshold;
when the capacity utilization rate of the database table of the current time node is smaller than the minimum capacity utilization rate threshold value, the capacity growth rate of the database table of the current time node conforms to a preset capacity growth range, and the type of the database table of the current time node is a fast table, generating an early warning signal;
and when the capacity growth rate of the database table of the current time node is smaller than the minimum capacity growth rate threshold, the capacity utilization rate of the database table of the current time node conforms to a preset capacity utilization range, and the type of the database table of the current time node is a fast table, generating an early warning signal.
Optionally, the determining, according to the target information of the database table of the current time node, the maximum available capacity of the database table of the current time node and the type of the database table of the current time node includes:
calculating the maximum available capacity of the database table of the current time node according to the parameter information of the database table of the current time node;
and determining the type of the database table of the current time node according to the application attribute information of the database table of the current time node.
Optionally, the determining the used capacity of the database table of the target time node according to the target information of the database table of the target time node includes:
and calculating the used capacity of the database table of the target time node according to the record number of the database table of the target time node and the space occupied by each record number.
Optionally, the obtaining, by calculating according to the maximum available capacity of the database table of the current time node and the used capacity of the database table of the target time node, the capacity usage rate of the database table of the current time node and the capacity growth rate of the database table of the current time node includes:
calculating the ratio of the used capacity of the database table of the current time node to the maximum available capacity of the database table of the current time node to obtain the capacity utilization rate of the database table of the current time node;
and calculating the capacity growth rate of the database table of the current time node according to the used capacity of the database table of the current time node, the used capacity of the database table of the previous time node and the maximum available capacity of the database table of the current time node.
Optionally, the determining the type of the database table of the current time node according to the application attribute information of the database table of the current time node includes:
and when the application attribute information of the database table of the current time node comprises any one of important transaction access, the access number of the database table exceeds a preset access value and the database table is switched day by day, determining that the database table of the current time node is a fast table, otherwise, determining that the database table is a conventional table.
The embodiment of the present application further provides a database table capacity monitoring device, the device includes:
the acquisition unit is used for acquiring the target information of the database table of the target time node; the target information comprises application attribute information, record number and parameter information; the target time node comprises a current time node and a previous time node;
a first determining unit, configured to determine, according to target information of the database table of the current time node, a maximum available capacity of the database table of the current time node and a type of the database table of the current time node;
the second determining unit is used for determining the used capacity of the database table of the target time node according to the target information of the database table of the target time node;
a calculating unit, configured to calculate, according to the maximum available capacity of the database table of the current time node and the used capacity of the database table of the target time node, a capacity usage rate of the database table of the current time node and a capacity growth rate of the database table of the current time node;
and the early warning unit is used for generating an early warning signal when the database table accords with an early warning condition according to the capacity utilization rate of the database table of the current time node, the capacity growth rate of the database table of the current time node and the type of the database table of the current time node.
Optionally, the early warning unit includes:
the first early warning subunit is used for generating an early warning signal when the capacity utilization rate of the database table of the current time node exceeds a maximum capacity utilization rate threshold and/or the capacity growth rate of the database table of the current time node exceeds a maximum capacity growth rate threshold;
the second early warning subunit is used for generating an early warning signal when the capacity utilization rate of the database table of the current time node accords with a preset capacity utilization range and the capacity growth rate of the database table of the current time node accords with a preset capacity growth range; the preset capacity utilization range is a range between a minimum capacity utilization threshold and a maximum capacity utilization threshold; the preset capacity increase range is a range between a minimum capacity increase rate threshold and a maximum capacity increase rate threshold;
a third early warning subunit, configured to generate an early warning signal when the capacity utilization rate of the database table of the current time node is smaller than the minimum capacity utilization rate threshold, the capacity growth rate of the database table of the current time node conforms to a preset capacity growth range, and the type of the database table of the current time node is a fast table;
and the fourth early warning subunit is configured to generate an early warning signal when the capacity growth rate of the database table of the current time node is smaller than the minimum capacity growth rate threshold, the capacity usage rate of the database table of the current time node meets a preset capacity usage range, and the type of the database table of the current time node is a fast table.
Optionally, the first determining unit includes:
the first calculation subunit is used for calculating the maximum available capacity of the database table of the current time node according to the parameter information of the database table of the current time node;
and the determining subunit is used for determining the type of the database table of the current time node according to the application attribute information of the database table of the current time node.
Optionally, the computing unit includes:
the second calculating subunit is configured to calculate a ratio of the used capacity of the database table of the current time node to the maximum available capacity of the database table of the current time node, and obtain a capacity utilization rate of the database table of the current time node;
and the third calculating subunit is used for calculating the capacity growth rate of the database table of the current time node according to the used capacity of the database table of the current time node, the used capacity of the database table of the previous time node and the maximum available capacity of the database table of the current time node.
According to the technical scheme, the method has the following beneficial effects:
the embodiment of the application provides a method and a device for monitoring database table capacity, wherein the method comprises the following steps: collecting target information of a database table of a target time node; the target information comprises application attribute information, record number and parameter information; the target time node includes a current time node and a previous time node. And determining the maximum available capacity of the database table of the current time node and the type of the database table of the current time node according to the target information of the database table of the current time node. And determining the used capacity of the database table of the target time node according to the target information of the database table of the target time node. And calculating the capacity utilization rate of the database table of the current time node and the capacity growth rate of the database table of the current time node according to the maximum available capacity of the database table of the current time node and the used capacity of the database table of the target time node. And generating an early warning signal when the database table is determined to meet the early warning condition according to the capacity utilization rate of the database table of the current time node, the capacity growth rate of the database table of the current time node and the type of the database table of the current time node. The capacity of the data table of the current time node is judged by acquiring and utilizing three-dimensional data, namely the utilization rate of the data table of the current time node, the growth rate of the data table of the current time node and the type of the data table of the current time node, the early warning is efficient and accurate, and data are acquired and analyzed from multiple dimensions to give early warning signals. The efficiency and accuracy of database table capacity monitoring are improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a database table capacity monitoring method according to an embodiment of the present application;
FIG. 2 is a flow chart of another database capacity monitoring method according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a database table capacity monitoring apparatus according to an embodiment of the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, embodiments accompanying the drawings are described in detail below.
Referring to fig. 1, fig. 1 is a flowchart of a database table capacity monitoring method according to an embodiment of the present application. As shown in fig. 1, the method comprises steps S101-S105:
s101: collecting target information of a database table of a target time node; the target information comprises application attribute information, record number and parameter information; the target time node includes a current time node and a previous time node.
And establishing a monitoring database, and putting the acquired target information of the database table of the target time node into the database. The target time node includes a current time node and a previous time node. The target information includes application attribute information, the number of records, and parameter information. In addition, the target information of the database table also comprises information such as the establishment time of the database table, the latest reorganization and maintenance time and the like. It is understood that the monitoring database includes target information of at least one data table, and the data table in S101 is a table.
As an example, the target information is RTS information. The RTS information includes application attribute information, the number of records, and parameter information. The number of records is the number of records in the data table. It should be noted that the system will automatically update the RTS information every half hour as the actual situation. It is understood that the update time of the RTS information is fixed.
And the time between the current time node and the previous time node is the time corresponding to the fixed period. The target information of the database table of the acquisition target time node comprises the target information of the database table of the acquisition previous time node and the target information of the database table of the acquisition current time node. It will be appreciated that the target information for a database table is collected once every fixed period. In this embodiment, the fixed period may be selected according to actual situations, and is not limited herein. For example, if the fixed period is 1 hour, the target information of the database table is collected from the system to the established database every 1 hour. In one embodiment, in a specific implementation, the target information of tens of thousands of tables is scanned and checked every 1 hour to obtain the target information of all the data tables, so that efficient and accurate management and control are realized.
S102: and determining the maximum available capacity of the database table of the current time node and the type of the database table of the current time node according to the target information of the database table of the current time node.
After the target information of the database table of the current time node is obtained, the maximum available capacity of the database table of the current time node and the type of the database table of the current time node can be determined according to the target information of the database table of the current time node.
Specifically, determining the maximum available capacity of the database table of the current time node and the type of the database table of the current time node according to the target information of the database table of the current time node includes:
calculating the maximum available capacity of the database table of the current time node according to the parameter information of the database table of the current time node;
and determining the type of the database table of the current time node according to the application attribute information of the database table of the current time node.
The physical space of the data table is not infinitely expanded, the upper limit of the physical space expansion of the data table is defined when the parameters of the data table are set, and the upper limit of the physical space expansion of the data table is the maximum available capacity.
During specific implementation, calculating the maximum available capacity of the database table of the current time node according to the parameter information of the database table of the current time node includes:
calculating the maximum available capacity of the database table according to SEGSIZE, DSSIZE, PARTITION and BUFFEROOL of the database table; the parameter information of the database table includes SEGSIZE, DSSIZE, PARTITION and BUFFEROOL of the database table.
In some embodiments, the SQL statement is used to obtain the SEGSIZE, DSSIZE, PARTITION, BUFFEROOL information of the table from the system, and if these parameters change or a new table is added, the table is updated in time. The maximum available capacity of the database table is calculated according to SEGSIZE, DSSIZE, PARTITION and BUFFEROOL of the database table, and specifically comprises the following steps:
(1) if part is equal to 0, representing that the data table is a non-partitioned table, then the maximum available space of the data table is (DSSIZE 1024) K.
(2) If PARTTION is greater than 0, representing that the data table is a partition table, and when BUFFERPOOL is equal to BP32K, the maximum available space of the data table is (SEGSIZE 1024 1.5) K; wherein, the buffer defines the physical space size of each page of the data table. BP32K represents a physical space size of 32K per page of the data table.
(3) If part is greater than 0 and buferpool is not equal to BP32K, the maximum available space of the data table is (SEGSIZE 1024) K.
It should be noted that the types of database tables include fast tables and regular tables. During specific implementation, the determining the type of the database table of the current time node according to the application attribute information of the database table of the current time node includes:
and when the application attribute information of the database table of the current time node comprises any one of important transaction access, the access number of the database table exceeds a preset access value and the database table is switched day by day, determining that the database table of the current time node is a fast table, otherwise, determining that the database table is a conventional table.
It should be noted that the application attribute information of the fast table is not limited to any one of important transaction access, the number of accesses of the database table exceeding a preset access value, and daily switching of the database table. That is, the application attribute information of the fast table may be determined according to actual conditions, and as long as the application attribute information of the data table meets the preset application attribute, the data table is the fast table. For example, when the data table needs to be focused on for a specific reason, the type of the data table is a fast table, and the specific reason is the preset application attribute. For another example, when the record growth of the data table is fast and exceeds the preset record growth rate, the data table is a fast table. The record growth rate of the data table exceeds the preset record growth rate, namely the data table belongs to the preset application attribute. For another example, some tables have transaction insertion data amount exceeding the preset data amount, and the table is a fast table. The transaction insertion data quantity of the data table exceeds the preset data quantity, namely the data table belongs to the preset application attribute. It is to be understood that the application property information is a comprehensive concept.
It should be noted that, in some embodiments, the fast table list is created according to the application attribute information of the data table, and the fast table list is modified irregularly as the service changes. When the data table belongs to the fast table list, the data table is the fast table.
S103: and determining the used capacity of the database table of the target time node according to the target information of the database table of the target time node.
According to the setting of the database, each new data table is built, the system can allocate a dedicated physical space for the data table to use, and with the increase of data in the data table, the physical space actually used by the data table is defined as the used capacity of the database table.
Because the target time node comprises a previous time node and a current time node, the used capacity of the database table of the target time node is determined according to the target information of the database table of the target time node, and the method comprises the following steps:
determining the used capacity of the database table of the previous time node according to the target information of the database table of the previous time node, and determining the used capacity of the database table of the current time node according to the target information of the database table of the current time node.
And during specific implementation, calculating the used capacity of the database table of the target time node according to the record number of the database table of the target time node and the space occupied by each record number. For example, the result of multiplying the number of records in the database table of the current time node by the space occupied by each record number is the used capacity of the database table of the current time node.
S104: and calculating the capacity utilization rate of the database table of the current time node and the capacity growth rate of the database table of the current time node according to the maximum available capacity of the database table of the current time node and the used capacity of the database table of the target time node.
Calculating the capacity utilization rate of the database table of the current time node and the capacity growth rate of the database table of the current time node according to the maximum available capacity of the database table of the current time node and the used capacity of the database table of the target time node, and the method comprises the following steps:
and calculating the ratio of the used capacity of the database table of the current time node to the maximum available capacity of the database table of the current time node to obtain the capacity utilization rate of the database table of the current time node. That is, the capacity usage rate S of the database table of the current time node is (used capacity of the database table of the current time node/maximum available capacity of the database table of the current time node) × 100%, and there are two thresholds, namely, a minimum capacity usage rate threshold S2 and a maximum capacity usage rate threshold S1. Wherein S2> S1. The capacity usage of the database table of the current time node higher than S2 indicates a very high growth rate, and lower than S1 indicates a low growth rate.
And calculating the capacity growth rate of the database table of the current time node according to the used capacity of the database table of the current time node, the used capacity of the database table of the previous time node and the maximum available capacity of the database table of the current time node. That is, the capacity growth rate Z of the database table of the current time node is ═ used capacity of the database table of the current time node-used capacity of the database table of the previous time node)/maximum available capacity of the database table of the current time node ] × 100%. There are two thresholds for usage, a minimum capacity growth rate threshold Z1 and a maximum capacity growth rate threshold Z2. Wherein Z2> Z1. The capacity growth rate of the database table of the current time node is higher than Z2 to indicate that the growth rate is very high, and lower than Z1 to indicate that the growth rate is low.
S105: and generating an early warning signal when the database table is determined to meet the early warning condition according to the capacity utilization rate of the database table of the current time node, the capacity growth rate of the database table of the current time node and the type of the database table of the current time node.
When the early warning method is specifically implemented, when the database table accords with the early warning condition according to the capacity utilization rate of the database table of the current time node, the capacity growth rate of the database table of the current time node and the type of the database table of the current time node, an early warning signal is generated, and the method comprises the following steps:
and when the capacity utilization rate of the database table of the current time node exceeds a maximum capacity utilization rate threshold value and/or the capacity growth rate of the database table of the current time node exceeds a maximum capacity growth rate threshold value, generating an early warning signal. If the capacity utilization rate S of the database table of the current time node is greater than S2, the capacity utilization is about to reach the upper limit, and an early warning signal is sent out; if the capacity growth rate Z of the database table of the current time node is greater than Z2, the capacity growth is fast, the capacity growth is abnormal fast, and an early warning signal is directly sent out. After the early warning signal is sent out, technicians can process the data sheet, and the specific processing mode comprises the following steps: cleaning the data table, compressing the data table, expanding the maximum available capacity of the data table, deleting and rebuilding the data table, and the like. In some embodiments, the two thresholds for Z and S are set to 15% for Z1, 20% for Z2, 75% for S1, and 82% for S2, respectively, and both thresholds for Z and S are summarized by a great deal of data analysis and working experience of the skilled artisan.
When the capacity utilization rate of the database table of the current time node accords with a preset capacity utilization range and the capacity growth rate of the database table of the current time node accords with a preset capacity growth range, generating an early warning signal; the preset capacity utilization range is a range between a minimum capacity utilization threshold and a maximum capacity utilization threshold; the preset capacity increase range is a range between greater than the minimum capacity increase rate threshold and less than the maximum capacity increase rate threshold. Namely Z1< Z < Z2 and S1< S < S2, indicate that the growth rate is higher and the usage rate is higher, and send out an early warning signal.
And when the capacity utilization rate of the database table of the current time node is smaller than the minimum capacity utilization rate threshold value, the capacity growth rate of the database table of the current time node accords with a preset capacity growth range, and the type of the database table of the current time node is a fast table, generating an early warning signal. That is, when S < S1 and Z1< Z2, it indicates that the increase rate is high, but the usage rate is not high, and whether or not an alarm signal is issued requires the introduction of the type of the data table to assist the determination. And when the data table is a fast table, sending out an early warning signal.
And when the capacity growth rate of the database table of the current time node is smaller than the minimum capacity growth rate threshold value, the capacity utilization rate of the database table of the current time node accords with a preset capacity utilization range, and the type of the database table of the current time node is a fast table, generating an early warning signal. Namely Z < Z1 and S1< S2, indicate that the increase rate of the capacity is not high, but the usage rate is high, and whether or not an early warning signal is issued requires introduction of the type of the data table to assist the determination. And when the data table is a fast table, sending out an early warning signal.
In some embodiments, the computational core analysis process in S102-S105 may be implemented using SQL and REXX scripts.
According to the database capacity monitoring method, the data of three dimensions, namely the utilization rate of the data table of the current time node, the growth rate of the data table of the current time node and the type of the data table of the current time node, are collected and utilized to judge the capacity of the data table of the current time node, early warning is efficient and accurate, data are collected and analyzed from multiple dimensions, and early warning signals are given. The early warning can be quickly carried out on the data table sensitive to the capacity in advance, and the pressure resistance and the external service capability of the database are improved. Useless early warning is filtered out for the tables with slow capacity growth, and manpower and material resources of the data center are saved. In addition, the used capacity of the data table is collected and imported into the monitoring database at fixed time points, and the used capacity of the data table in a certain period of time can be inquired at any time, so that data support is provided for a subsequent scheme. The system resource can be saved, the technical means of printing the used space of the disk information acquisition table in the prior related art is not needed, and the consumption of disk I/O can be reduced.
Referring to fig. 2, fig. 2 is a flowchart of another database capacity monitoring method provided in the embodiment of the present application. As shown in fig. 2, the method comprises steps S201-S210:
s201: calculating first dimension data: a capacity growth rate Z of the data table;
after collecting the target information of the database table of the target time node, calculating first dimension data: the capacity growth rate Z of the data table of the current time node. The target time node includes a current time node and a previous time node.
S202: judging whether Z is larger than Z2; if yes, jumping to S210; if not, jumping to S203;
s203: calculating second dimension data: capacity usage of the data table S;
calculating second dimension data based on the target information of the database table of the target time node: capacity usage S of the data table.
S204: judging whether S is larger than S2; if yes, jumping to S210; if not, jumping to S205;
s205: determining whether Z1< Z2 and S1< S2 are simultaneously satisfied; if yes, jumping to S210; if not, jumping to S206;
s206: determining whether Z1< Z2 and S < S1 are simultaneously satisfied; if yes, jumping to S208; if not, jumping to S207;
s207: determining whether S1< S2 and Z < Z1 are simultaneously satisfied; if yes, jumping to S208; if not, ending;
s208: introducing third dimension data: application attribute information of the data table;
the application attribute information of the data table may also be referred to as a use attribute. Determining third dimension data based on the target information of the database table of the target time node: application attribute information of the data table.
S209: judging whether the data table is a fast table or not;
and judging whether the data table is a fast table or not according to the application attribute information of the data table.
S210: and (5) early warning the capacity of the data table.
The capacity of the data table of the current time node is judged by acquiring and utilizing three-dimensional data, namely the utilization rate of the data table of the current time node, the growth rate of the data table of the current time node and the type of the data table of the current time node, the early warning is efficient and accurate, and data are acquired and analyzed from multiple dimensions to give early warning signals. The efficiency and accuracy of database table capacity monitoring are improved.
Referring to fig. 3, fig. 3 is a schematic diagram of a database table capacity monitoring apparatus according to an embodiment of the present application. As shown in fig. 3, the apparatus includes:
an acquisition unit 301, configured to acquire target information of the database table of a target time node; the target information comprises application attribute information, record number and parameter information; the target time node comprises a current time node and a previous time node;
a first determining unit 302, configured to determine, according to target information of the database table of the current time node, a maximum available capacity of the database table of the current time node and a type of the database table of the current time node;
a second determining unit 303, configured to determine, according to the target information of the database table of the target time node, the used capacity of the database table of the target time node;
a calculating unit 304, configured to calculate, according to the maximum available capacity of the database table of the current time node and the used capacity of the database table of the target time node, to obtain a capacity usage rate of the database table of the current time node and a capacity growth rate of the database table of the current time node;
the early warning unit 305 is configured to generate an early warning signal when it is determined that the database table meets an early warning condition according to the capacity utilization rate of the database table of the current time node, the capacity growth rate of the database table of the current time node, and the type of the database table of the current time node.
In some implementations of the embodiments of the present application, the early warning unit 305 includes:
the first early warning subunit is used for generating an early warning signal when the capacity utilization rate of the database table of the current time node exceeds a maximum capacity utilization rate threshold and/or the capacity growth rate of the database table of the current time node exceeds a maximum capacity growth rate threshold;
the second early warning subunit is used for generating an early warning signal when the capacity utilization rate of the database table of the current time node accords with a preset capacity utilization range and the capacity growth rate of the database table of the current time node accords with a preset capacity growth range; the preset capacity utilization range is a range between a minimum capacity utilization threshold and a maximum capacity utilization threshold; the preset capacity increase range is a range between a minimum capacity increase rate threshold and a maximum capacity increase rate threshold;
a third early warning subunit, configured to generate an early warning signal when the capacity utilization rate of the database table of the current time node is smaller than the minimum capacity utilization rate threshold, the capacity growth rate of the database table of the current time node conforms to a preset capacity growth range, and the type of the database table of the current time node is a fast table;
and the fourth early warning subunit is configured to generate an early warning signal when the capacity growth rate of the database table of the current time node is smaller than the minimum capacity growth rate threshold, the capacity usage rate of the database table of the current time node meets a preset capacity usage range, and the type of the database table of the current time node is a fast table.
In some implementations of embodiments of the present application, the first determining unit 302 includes:
the first calculation subunit is used for calculating the maximum available capacity of the database table of the current time node according to the parameter information of the database table of the current time node;
and the determining subunit is used for determining the type of the database table of the current time node according to the application attribute information of the database table of the current time node.
In some implementations of embodiments of the present application, the computing unit 304 includes:
the second calculating subunit is configured to calculate a ratio of the used capacity of the database table of the current time node to the maximum available capacity of the database table of the current time node, and obtain a capacity utilization rate of the database table of the current time node;
and the third calculating subunit is used for calculating the capacity growth rate of the database table of the current time node according to the used capacity of the database table of the current time node, the used capacity of the database table of the previous time node and the maximum available capacity of the database table of the current time node.
By the database table capacity monitoring device provided by the embodiment of the application, the target information of the database table of the target time node is collected; the target information comprises application attribute information, record number and parameter information; the target time node includes a current time node and a previous time node. And determining the maximum available capacity of the database table of the current time node and the type of the database table of the current time node according to the target information of the database table of the current time node. And determining the used capacity of the database table of the target time node according to the target information of the database table of the target time node. And calculating the capacity utilization rate of the database table of the current time node and the capacity growth rate of the database table of the current time node according to the maximum available capacity of the database table of the current time node and the used capacity of the database table of the target time node. And generating an early warning signal when the database table is determined to meet the early warning condition according to the capacity utilization rate of the database table of the current time node, the capacity growth rate of the database table of the current time node and the type of the database table of the current time node. The capacity of the data table of the current time node is judged by acquiring and utilizing the three dimensions of the utilization rate of the data table of the current time node, the growth rate of the data table of the current time node and the type of the data table of the current time node, the early warning is efficient and accurate, data are acquired and analyzed from multiple dimensions, early warning signals are given, and the efficiency and the accuracy of monitoring the capacity of the data table are improved.
As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps in the above embodiment methods can be implemented by software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present application may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network communication device such as a media gateway, etc.) to execute the method according to the embodiments or some parts of the embodiments of the present application.
It should be noted that, in the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. The method disclosed by the embodiment corresponds to the system disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the system part for description.
It should also be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for database table capacity monitoring, the method comprising:
collecting target information of the database table of a target time node; the target information comprises application attribute information, record number and parameter information; the target time node comprises a current time node and a previous time node;
determining the maximum available capacity of the database table of the current time node and the type of the database table of the current time node according to the target information of the database table of the current time node;
determining the used capacity of the database table of the target time node according to the target information of the database table of the target time node;
calculating to obtain the capacity utilization rate of the database table of the current time node and the capacity growth rate of the database table of the current time node according to the maximum available capacity of the database table of the current time node and the used capacity of the database table of the target time node;
and generating an early warning signal when the database table meets the early warning condition according to the capacity utilization rate of the database table of the current time node, the capacity growth rate of the database table of the current time node and the type of the database table of the current time node.
2. The method of claim 1, wherein the categories of database tables include fast tables and regular tables; when the database table is determined to accord with the early warning condition according to the capacity utilization rate of the database table of the current time node, the capacity growth rate of the database table of the current time node and the type of the database table of the current time node, generating an early warning signal, including:
generating an early warning signal when the capacity utilization rate of the database table of the current time node exceeds a maximum capacity utilization rate threshold and/or the capacity growth rate of the database table of the current time node exceeds a maximum capacity growth rate threshold;
generating an early warning signal when the capacity utilization rate of the database table of the current time node accords with a preset capacity utilization range and the capacity growth rate of the database table of the current time node accords with a preset capacity growth range; the preset capacity utilization range is a range between a minimum capacity utilization threshold and a maximum capacity utilization threshold; the preset capacity increase range is a range between a minimum capacity increase rate threshold and a maximum capacity increase rate threshold;
when the capacity utilization rate of the database table of the current time node is smaller than the minimum capacity utilization rate threshold value, the capacity growth rate of the database table of the current time node conforms to a preset capacity growth range, and the type of the database table of the current time node is a fast table, generating an early warning signal;
and when the capacity growth rate of the database table of the current time node is smaller than the minimum capacity growth rate threshold, the capacity utilization rate of the database table of the current time node conforms to a preset capacity utilization range, and the type of the database table of the current time node is a fast table, generating an early warning signal.
3. The method of claim 1, wherein the determining the maximum available capacity of the database table of the current time node and the category of the database table of the current time node according to the target information of the database table of the current time node comprises:
calculating the maximum available capacity of the database table of the current time node according to the parameter information of the database table of the current time node;
and determining the type of the database table of the current time node according to the application attribute information of the database table of the current time node.
4. The method of claim 1, wherein the determining the used capacity of the database table of the target time node from the target information of the database table of the target time node comprises:
and calculating the used capacity of the database table of the target time node according to the record number of the database table of the target time node and the space occupied by each record number.
5. The method of claim 1, wherein the calculating the capacity usage rate of the database table at the current time node and the capacity growth rate of the database table at the current time node according to the maximum available capacity of the database table at the current time node and the used capacity of the database table at the target time node comprises:
calculating the ratio of the used capacity of the database table of the current time node to the maximum available capacity of the database table of the current time node to obtain the capacity utilization rate of the database table of the current time node;
and calculating the capacity growth rate of the database table of the current time node according to the used capacity of the database table of the current time node, the used capacity of the database table of the previous time node and the maximum available capacity of the database table of the current time node.
6. The method of claim 3, wherein the determining the type of the database table of the current time node according to the application attribute information of the database table of the current time node comprises:
and when the application attribute information of the database table of the current time node comprises any one of important transaction access, the access number of the database table exceeds a preset access value and the database table is switched day by day, determining that the database table of the current time node is a fast table, otherwise, determining that the database table is a conventional table.
7. An apparatus for database table capacity monitoring, the apparatus comprising:
the acquisition unit is used for acquiring the target information of the database table of the target time node; the target information comprises application attribute information, record number and parameter information; the target time node comprises a current time node and a previous time node;
a first determining unit, configured to determine, according to target information of the database table of the current time node, a maximum available capacity of the database table of the current time node and a type of the database table of the current time node;
the second determining unit is used for determining the used capacity of the database table of the target time node according to the target information of the database table of the target time node;
a calculating unit, configured to calculate, according to the maximum available capacity of the database table of the current time node and the used capacity of the database table of the target time node, a capacity usage rate of the database table of the current time node and a capacity growth rate of the database table of the current time node;
and the early warning unit is used for generating an early warning signal when the database table accords with an early warning condition according to the capacity utilization rate of the database table of the current time node, the capacity growth rate of the database table of the current time node and the type of the database table of the current time node.
8. The apparatus of claim 7, wherein the early warning unit comprises:
the first early warning subunit is used for generating an early warning signal when the capacity utilization rate of the database table of the current time node exceeds a maximum capacity utilization rate threshold and/or the capacity growth rate of the database table of the current time node exceeds a maximum capacity growth rate threshold;
the second early warning subunit is used for generating an early warning signal when the capacity utilization rate of the database table of the current time node accords with a preset capacity utilization range and the capacity growth rate of the database table of the current time node accords with a preset capacity growth range; the preset capacity utilization range is a range between a minimum capacity utilization threshold and a maximum capacity utilization threshold; the preset capacity increase range is a range between a minimum capacity increase rate threshold and a maximum capacity increase rate threshold;
a third early warning subunit, configured to generate an early warning signal when the capacity utilization rate of the database table of the current time node is smaller than the minimum capacity utilization rate threshold, the capacity growth rate of the database table of the current time node conforms to a preset capacity growth range, and the type of the database table of the current time node is a fast table;
and the fourth early warning subunit is configured to generate an early warning signal when the capacity growth rate of the database table of the current time node is smaller than the minimum capacity growth rate threshold, the capacity usage rate of the database table of the current time node meets a preset capacity usage range, and the type of the database table of the current time node is a fast table.
9. The apparatus of claim 7, wherein the first determining unit comprises:
the first calculation subunit is used for calculating the maximum available capacity of the database table of the current time node according to the parameter information of the database table of the current time node;
and the determining subunit is used for determining the type of the database table of the current time node according to the application attribute information of the database table of the current time node.
10. The apparatus of claim 7, wherein the computing unit comprises:
the second calculating subunit is configured to calculate a ratio of the used capacity of the database table of the current time node to the maximum available capacity of the database table of the current time node, and obtain a capacity utilization rate of the database table of the current time node;
and the third calculating subunit is used for calculating the capacity growth rate of the database table of the current time node according to the used capacity of the database table of the current time node, the used capacity of the database table of the previous time node and the maximum available capacity of the database table of the current time node.
CN202110128401.5A 2021-01-29 2021-01-29 Database table capacity monitoring method and device Active CN112783732B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110128401.5A CN112783732B (en) 2021-01-29 2021-01-29 Database table capacity monitoring method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110128401.5A CN112783732B (en) 2021-01-29 2021-01-29 Database table capacity monitoring method and device

Publications (2)

Publication Number Publication Date
CN112783732A true CN112783732A (en) 2021-05-11
CN112783732B CN112783732B (en) 2023-10-10

Family

ID=75759972

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110128401.5A Active CN112783732B (en) 2021-01-29 2021-01-29 Database table capacity monitoring method and device

Country Status (1)

Country Link
CN (1) CN112783732B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130086129A1 (en) * 2011-09-30 2013-04-04 Douglas P. Brown Regulating capacity and managing services of computing environments and systems that include a database
CN104636450A (en) * 2015-01-26 2015-05-20 上海新炬网络信息技术有限公司 Database table space monitoring method
WO2019062189A1 (en) * 2017-09-30 2019-04-04 平安科技(深圳)有限公司 Electronic device, method and system for conducting data table filing processing, and storage medium
CN110287082A (en) * 2019-07-02 2019-09-27 中国工商银行股份有限公司 Database table spatial content monitoring method and device
CN111694816A (en) * 2020-06-15 2020-09-22 中国工商银行股份有限公司 Processing method and device for optimizing database table

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130086129A1 (en) * 2011-09-30 2013-04-04 Douglas P. Brown Regulating capacity and managing services of computing environments and systems that include a database
CN104636450A (en) * 2015-01-26 2015-05-20 上海新炬网络信息技术有限公司 Database table space monitoring method
WO2019062189A1 (en) * 2017-09-30 2019-04-04 平安科技(深圳)有限公司 Electronic device, method and system for conducting data table filing processing, and storage medium
CN110287082A (en) * 2019-07-02 2019-09-27 中国工商银行股份有限公司 Database table spatial content monitoring method and device
CN111694816A (en) * 2020-06-15 2020-09-22 中国工商银行股份有限公司 Processing method and device for optimizing database table

Also Published As

Publication number Publication date
CN112783732B (en) 2023-10-10

Similar Documents

Publication Publication Date Title
JP7279266B2 (en) Methods and apparatus for storing and querying time series data, and their servers and storage media
CN110708212B (en) Method and device for tracking call link in distributed system
CN110321339B (en) Data migration method, device, equipment and storage medium
CN113051147A (en) Database cluster monitoring method, device, system and equipment
CN105763595A (en) Method of improving data processing efficiency and server
CN110866166A (en) Distributed web crawler performance optimization system for mass data acquisition
CN109062769B (en) Method, device and equipment for predicting IT system performance risk trend
CN110968380A (en) Data visualization method and system
CN116594857A (en) Office software intelligent interaction management platform based on artificial intelligence
CN114500543B (en) Distributed elastic edge acquisition system and application method thereof
CN103607731A (en) Method and device for processing measurement reports
CN108920098A (en) A kind of storage management system collects method, system and the equipment of information
CN113377817A (en) Data processing method, system, device and storage medium
CN112783732B (en) Database table capacity monitoring method and device
CN105095224A (en) Method, apparatus and system for carrying out OLAP analysis in mobile communication network
CN110543509A (en) Monitoring system, method and device for user access data and electronic equipment
CN114077532A (en) SQL statement execution efficiency detection method and device
CN112817987A (en) Method, device, equipment and storage medium for accessing distributed storage cluster
CN113034201A (en) Real-time early warning method, system and computer based on advertisement putting process
EP2497256B1 (en) Reducing computational complexity during user data analysis
CN110955547A (en) Management method, system, equipment and readable storage medium for interface abnormal information
CN110597572A (en) Service calling relation analysis method and computer system
CN114816770B (en) Universal system for measuring computer service pressure state and implementation method
CN113835986B (en) Dynamic switching method and device for system cold and hot logs and computer equipment
CN110191026B (en) Distributed service link monitoring method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant