WO2019134230A1 - 数据库监控方法、装置、终端设备及存储介质 - Google Patents

数据库监控方法、装置、终端设备及存储介质 Download PDF

Info

Publication number
WO2019134230A1
WO2019134230A1 PCT/CN2018/077250 CN2018077250W WO2019134230A1 WO 2019134230 A1 WO2019134230 A1 WO 2019134230A1 CN 2018077250 W CN2018077250 W CN 2018077250W WO 2019134230 A1 WO2019134230 A1 WO 2019134230A1
Authority
WO
WIPO (PCT)
Prior art keywords
scan
data
instruction
obtaining
database
Prior art date
Application number
PCT/CN2018/077250
Other languages
English (en)
French (fr)
Inventor
李坤
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019134230A1 publication Critical patent/WO2019134230A1/zh

Links

Images

Classifications

    • 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/21Design, administration or maintenance of databases
    • 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

Definitions

  • the present application relates to the field of databases, and in particular, to a database monitoring method, apparatus, terminal device, and storage medium.
  • Full table scan and implicit conversion are two ways to query data in a SQL database.
  • the full table scan is the process used by the database server to search each record of the table until all the records that meet the given conditions are returned. Generally used to query unindexed tables. Implicit conversion is the direct assignment of one data type to another.
  • SQL Structured Query Language
  • the SQL (Structured Query Language) instruction execution process generates a SQL execution plan, and the SQL instruction and the corresponding SQL execution plan are cached in the SQL database.
  • the embodiment of the present application provides a database monitoring method, device, terminal device, and storage medium, so as to solve the problem that the data stored in the database for more than one day cannot be monitored.
  • an embodiment of the present application provides a database monitoring method, including:
  • the embodiment of the present application provides a database monitoring apparatus, including:
  • a temporary table creation module for creating a temporary table in an SQL database
  • a data scan instruction acquisition module configured to acquire a data scan instruction sent by the local server
  • a data scan result obtaining and storing module configured to acquire a corresponding data scan result from the SQL database based on the data scan instruction, and store the data scan result in the temporary table;
  • a data monitoring instruction acquiring module configured to acquire a data monitoring instruction sent by the local server, where the data monitoring instruction includes a monitoring period;
  • a target data sending module configured to acquire data in the monitoring period from the temporary table as target data, and send the target data to the local server.
  • an embodiment of the present application provides a terminal device, including a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, where the processor executes the computer The following steps are implemented when reading the instruction:
  • an embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium stores computer readable instructions, and when the computer readable instructions are executed by a processor, the following steps are implemented:
  • a temporary table is first created in a SQL database, and a temporary table is created in the SQL database to store a cache of a performance table corresponding to the SQL database.
  • the data Specifically, after acquiring the data scan instruction sent by the local server, the corresponding data scan result is obtained from the SQL database based on the data scan instruction, and the data scan result is stored in the temporary table to store the performance table v$sql.
  • the database monitoring method can monitor related data cached in the SQL database performance table v$sql and the performance table v$sql_plan for more than one day to realize long-term monitoring of the database.
  • Embodiment 1 is a flow chart of a database monitoring method in Embodiment 1 of the present application.
  • FIG. 2 is a flowchart of a specific implementation manner of a database monitoring method in Embodiment 1 of the present application.
  • FIG. 3 is a schematic block diagram of a database monitoring apparatus in Embodiment 2 of the present application.
  • FIG. 4 is a schematic diagram of a terminal device in Embodiment 4 of the present application.
  • FIG. 1 shows a flow chart of a database monitoring method in this embodiment.
  • the database monitoring method is applied to a terminal device installed with a database for monitoring data and improving database system performance.
  • the database monitoring method includes the following steps:
  • the SQL database is a SQL-based database.
  • SQL is an operational command set built for the database. It is a full-featured database language for managing databases.
  • the SQL instructions in the SQL database and the corresponding SQL execution plan are cached in the performance table of the SQL database. Specifically, the SQL instruction is cached in the performance table v$sql, and the SQL execution plan is cached in the performance table v$sql_plan.
  • the SQL instructions and their corresponding SQL execution plans are only one day in the SQL database performance table v$sql and the performance table v$sql_plan. More than one day of SQL instructions and corresponding SQL execution plans will be from the SQL database.
  • the performance table v$sql and the performance table v$sql_plan are automatically removed.
  • the temporary table is a data table created in the SQL database, and a temporary table is created in the SQL database, and the temporary table is used to store the data scan result after scanning the performance table v$sql and the performance table v$sql_plan in the SQL database. .
  • creating a temporary table in the SQL database refers to creating a temporary table connected to the performance table v$sql and the performance table v$sql_plan in the SQL database for storing the SQL in the performance table v$sql
  • the corresponding SQL execution plan in the instruction and performance table v$sql_plan to extend the storage age of the SQL instructions and the corresponding SQL execution plan.
  • S20 Acquire a data scan instruction sent by the local server.
  • the data scan instruction is an instruction for scanning data in the database.
  • the local server is a server that interacts with the user through the client. After receiving the data scan command sent by the client, the local server sends the data scan command to the terminal device with the database installed, so that the database of the terminal device is obtained.
  • the data scan instruction specifically refers to an instruction for scanning the SQL instruction cached in the performance table v$sql and the corresponding SQL execution plan cached in the performance table v$sql_plan to ensure the data scan instruction and the scanned data. Correspondence between.
  • the data scan result refers to the data obtained by scanning the corresponding performance table according to the data scan instruction.
  • the SQL database is scanned based on the data scan instruction to obtain the data scan result and stored in the temporary table to prevent the data scan instruction or its corresponding data scan result from exceeding the cache of the performance table. Lost during the period.
  • the data scan instruction is an instruction to scan the SQL instruction cached in the performance table v$sql and the SQL execution plan cached in the performance table v$sql_plan
  • the performance table v$sql and the performance table v in the SQL database respectively The $sql_plan scans, obtains the corresponding data scan result, and stores the obtained scan result in the temporary table created in step S10.
  • S40 Acquire a data monitoring instruction sent by the local server, where the data monitoring instruction includes a monitoring period.
  • the data monitoring instruction refers to an instruction for monitoring the data scanning result in the temporary table.
  • the monitoring period is used to select which time period data needs to be monitored. Through the setting of the monitoring period, you can quickly locate the data that the data monitoring instruction needs to monitor in the temporary table.
  • the monitoring period includes the current time and the monitoring duration.
  • the current time refers to the current time of the system when the data monitoring command is received.
  • the monitoring duration is the length of time to monitor the data scan results in the temporary table. For example, when the data monitoring command is received, the current time of the system is 12:00 on October 20, 2017, and the monitoring time is 24 hours. At this time, the monitoring period in the data monitoring instruction refers to from October 19, 2017. 24 hours from 12:00 to 12:00 on October 20, 2017.
  • S50 Obtain the data scan result in the monitoring period from the temporary table as the target data, and send the target data to the local server.
  • the target data refers to the corresponding data scan result in the temporary table in the monitoring period.
  • the target data is obtained according to the monitoring period. Therefore, the target data acquired in different monitoring periods is different, so as to ensure the correspondence between the target data and the monitoring period, the target data can be obtained through the selection of the monitoring period, and the monitoring method of the database is improved. Sex.
  • the target data is sent to the local server, so that the local server acquires the target data to be monitored, and sends the target data to the client, so that the corresponding user can view the target data through the client.
  • a local program may be created in the local server based on the java language, and the local program is sent to the terminal device that installs the database to send a data scan instruction, and the temporary scan table is scanned based on the data scan instruction to obtain a newly generated
  • the data scan results are stored in a pre-created data table of the local server to save the data scan results in the temporary table to the local server for a long time.
  • the data table pre-created by the local server may be named according to the time period represented by the monitoring period in the data monitoring instruction, and naming the obtained data table according to the time period may help to quickly find the corresponding target data.
  • the monitoring period is 24 hours from 12:00 on October 19, 2017 to 12:00 on October 20, 2017.
  • the corresponding data table can be named: 2017.10.20.12.00-2017.10.21.12.00. This naming method makes it easy and quick to find the corresponding target data in the local server.
  • the local program can be set to be executed once a day to realize automatic extraction of the data scan result in the temporary table, and the data is automatically transferred and saved without manual operation.
  • a temporary table is first created in the SQL database, and a temporary table is created in the SQL database to store data in the performance table corresponding to the SQL database that cannot exceed one day. Specifically, after acquiring the data scan instruction sent by the local server, the corresponding data scan result is obtained from the SQL database based on the data scan instruction, and the data scan result is stored in the temporary table to store the performance table v$sql. The SQL instruction and the corresponding SQL execution plan in the performance table v$sql_plan.
  • the database monitoring method can monitor more than one day of relevant data in the SQL database performance table v$sql and the performance table v$sql_plan to achieve long-term monitoring of the database.
  • the database monitoring method further includes:
  • the target data stored in the temporary table and sent to the local server may be deleted, so as to facilitate the performance of the next timed task execution in the performance table v$sql.
  • the SQL instruction and the corresponding SQL execution plan related data in the v$sql_plan data are scanned and the data scan results are stored, and the storage pressure of the database can be released in time.
  • the data scan instruction includes a full table scan instruction and/or an implicit conversion scan instruction
  • the full table scan instruction includes a full table scan period
  • the implicit conversion scan instruction includes an implicit conversion scan period
  • the full table scan instruction refers to an instruction to scan the data related to the full table scan in the performance table v$sql and the performance table v$sql_plan.
  • the full table scan period is the time interval for scanning the data related to the full table scan in the performance table v$sql and the performance table v$sql_plan.
  • the implicit conversion scan instruction is an instruction to scan the data related to the implicit conversion in the performance table v$sql and the performance table v$sql_plan.
  • the implicit conversion scan period is the time interval for scanning the data related to the implicit conversion in the performance table v$sql and the performance table v$sql_plan.
  • the data scanning result is obtained from the SQL database based on the data scanning instruction, and the data scanning result is stored in the temporary table (ie, step S30), and specifically includes the following three processing procedures.
  • the first processing procedure is specifically a process including a full table scan query, that is, when the data scan instruction includes a full table scan instruction, step S30 specifically includes: performing a full table scan in each full table scan period based on the full table scan instruction.
  • the query obtains the corresponding full table scan result from the SQL database and stores the full table scan result in the temporary table.
  • the full table scan query refers to the process of querying and filtering the data of the full table scan in the performance table v$sql and the performance table v$sql_plan.
  • the full table scan results are the results of scanning the data related to the full table scan in the performance table v$sql and the performance table v$sql_plan.
  • the obtained full table scan results are stored in the temporary table to ensure that more than one day of SQL instructions and the corresponding SQL execution plan are automatically deleted from the SQL database performance table v$sql and performance table v$sql_plan,
  • the second processing process is specifically a process including an implicit conversion scan query, that is, when the data scan instruction includes an implicit conversion scan instruction, step S30 specifically includes: performing an implicit conversion scan cycle in each implicit conversion scan cycle.
  • An implicit conversion scan query obtains the corresponding implicit conversion scan result from the SQL database and stores the implicit conversion scan result in the temporary table.
  • the implicit conversion scan query refers to the process of querying and filtering the implicit conversion scan data in the performance table v$sql and the performance table v$sql_plan.
  • the result of the implicit conversion scan is the result of scanning the data related to the implicit conversion in the performance table v$sql and the performance table v$sql_plan.
  • the obtained implicit conversion scan results are stored in the temporary table to ensure that more than one day of SQL instructions and corresponding SQL execution plans are automatically deleted from the SQL database performance table v$sql and the performance table v$sql_plan. Obtain the corresponding data from the result of the implicit conversion scan in the temporary table.
  • the third process includes a first process and a second process, both performing a full table scan query and an implicit conversion scan query.
  • the full table scan query and the implicit conversion scan query are executed according to the corresponding scan cycle, and the corresponding full table scan result and implicit conversion scan result are obtained from the SQL database, and the whole Table scan results and implicit conversion scan results are stored in a temporary table.
  • the database can be monitored according to the scan result in time.
  • the data scan instruction may include only one of the scan instructions, that is, the full table scan instruction or the implicit conversion scan instruction, thereby implementing the corresponding scan query according to the data scan instruction (full table scan query or implicit conversion scan instruction) ), reducing the unnecessary scanning process, improving the scanning speed, and thus improving the monitoring efficiency of the database.
  • the full table scan period can be set to be greater than the implicit conversion scan period.
  • the frequency of implicit conversion in the system is higher than that of the full table scan. Therefore, the implicit conversion scan period can be set to be shorter, so that scanning and monitoring can be performed in time, and the real-time and accuracy of database monitoring can be improved.
  • the period of the full table scan is set longer, which can reduce the query burden of the full table scan and improve the overall scanning efficiency.
  • the full table scan period and the implicit conversion scan period are reasonably set to reasonably allocate the corresponding scan query process, so that the database monitoring method is effective in monitoring and accurate. Sexually achieve a reasonable match.
  • the full table scan period can be set to 10 min.
  • a full table scan query is executed every 10 minutes (the full table scan query condition is limited by the SQL instruction), and the full table scan result is obtained, and the full table scan result is obtained. Stored in a temporary table that has already been created.
  • the implicit conversion scan period can be set to 2 min.
  • an implicit conversion scan query is executed every 2 minutes (the implicit conversion query condition is defined by the SQL instruction), and an implicit conversion scan result is obtained. Implicit conversion scan results are stored in a temporary table that has already been created.
  • the database monitoring method further includes:
  • S71 Acquire a data analysis result formed by the local server based on the target data, where the data analysis result includes the existing defect data type.
  • the existing defect data type refers to the data type that the local server obtains the corresponding target data from the SQL database and analyzes the performance of the SQL database system before the current time.
  • the defect data type is obtained by analyzing the target data. Since the type of defect data obtained by each data analysis occurs before the current time of the next data monitoring, the type of defect data existing before the current time is referred to as the existing defect data type.
  • the SQL defect predicted by the target data can be found and a specific improvement scheme can be formulated according to the SQL to minimize the serious performance problem caused by the full table scan and/or the implicit conversion.
  • the full table scan is to query the unindexed table, for the full table scan phenomenon that occurs in the database system, the effect of the full table scan on the performance of the database system can be avoided by curing the index or adding an index.
  • the full table scan when querying the data table in the database, if the data volume of the table is small and the data is no longer increased, the full table scan has little impact on the performance of the database system. In this case, the full table scan can be ignored. defect. If the amount of data in the table is large, the full table scan existing at this time will have an impact on the performance of the database system. In this case, the SQL instruction corresponding to the full table scan needs to be optimized.
  • the local server sends the existing defect data type obtained after analysis to the database for storage.
  • the database stores the existing defect data type, in the subsequent data scanning process, the specific data can be adjusted based on the existing defect data type. Scan strategies to improve the efficiency of data scanning.
  • the database monitoring method further includes: acquiring the existing defect data type based on the data scan instruction, and the existing defect data type includes the existing full table scan defect. Type and / or existing implicit conversion defect type.
  • the full table scan defect data type refers to the defect data type that the local server obtains from the SQL database and the corresponding full table scan result is analyzed to affect the performance of the SQL database.
  • the implicit conversion defect data type refers to the defect data type that the local server obtains from the SQL database and the corresponding implicit conversion scan result is analyzed to affect the performance of the SQL database.
  • obtaining the corresponding data scan result from the SQL database based on the data scan instruction in step S20 specifically includes: obtaining a corresponding full table scan from the SQL database. Results and/or implicit conversion scan results.
  • obtaining the corresponding full table scan result from the SQL database specifically includes: skipping the full table scan data corresponding to the existing full table scan defect data type, and obtaining the full table scan result.
  • a full table scan query is performed in each full table scan cycle, and in the process of the full table scan query, the full table scan data corresponding to the existing full table scan defect data type is skipped.
  • Obtain the full table scan result to avoid repeated scan and analysis of the full table scan related data of the same defect type, which can reduce the full table scan query time and improve the query efficiency.
  • obtaining the corresponding implicit conversion scan result from the SQL database specifically includes: skipping the implicit conversion scan data corresponding to the existing implicit conversion defect data type, and obtaining the implicit conversion scan result.
  • an implicit conversion scan query is performed every implicit conversion scan period, and in the process of implicit conversion scan query, skipping the corresponding implicit conversion conversion data type
  • the implicit scan scan data is obtained, and the implicit conversion scan result is obtained to avoid repeated scan and analysis of the implicit conversion related data of the same defect type, which can reduce the implicit conversion scan query time and improve the query efficiency.
  • the data scan instruction is a timing instruction
  • the timing instruction includes a program trigger time and a program ID.
  • the timing instruction refers to an instruction executed according to a predetermined time.
  • the program trigger time is the specific time when the program is executed.
  • the program ID is an identifier for identifying a scan program including, but not limited to, a full table scan program and an implicit conversion scan program in the present embodiment.
  • the obtaining the corresponding data scan result from the SQL database based on the data scan instruction specifically includes the following steps:
  • the full table scan program and/or the implicit conversion scan program corresponding to the program ID are called to obtain the corresponding full table scan result and/or from the SQL database. Implicit conversion scan results.
  • the full table scan program refers to the program code for scanning the full table scan related data in the performance table v$sql and the performance table v$sql_plan in the full table scan query, the program code for the performance table v$sql and the performance table v$sql_plan
  • the data related to the full table scan is used for query screening.
  • the implicit conversion scan program refers to the program code for scanning the data related to the implicit conversion scan in the performance table v$sql and the performance table v$sql_plan in the implicit conversion scan query, and the program code is for the performance table v$sql and
  • the data related to the implicit conversion in the performance table v$sql_plan is queried for filtering.
  • the program ID is an identifier for uniquely identifying the program
  • the program corresponding to the data scan instruction can be executed by the program ID to ensure that the corresponding program is executed based on the data scan instruction. To get the desired scan results.
  • the current time of the system By obtaining the current time of the system, it is determined whether the current time of the system is the program trigger time to determine whether the data scanner should be called at the current system time.
  • the full table scanner and/or the implicit conversion scanner corresponding to the program ID are called, and the SQL database is obtained by scanning the performance table v$sql and the performance table v$sql_plan. Corresponding full table scan results and/or implicit conversion scan results.
  • the data scan instruction is a full table scan instruction
  • the full table scan program is invoked, and the full table is performed on the performance table v$sql and the performance table v$sql_plan.
  • the data scan instruction is an implicit conversion scan instruction
  • the implicit conversion scan program is called, and the performance table v$sql and the performance table v$sql_plan are implicitly converted. Scan to get the corresponding implicit conversion scan results in the SQL database.
  • the data scan instruction is a full table scan instruction and an implicit conversion scan instruction
  • the full table scan program and the implicit conversion scan program are called, and the performance table v$sql is passed.
  • the performance table v$sql_plan for full table scan and implicit conversion scan to obtain the corresponding full table scan results and implicit conversion scan results in the SQL database.
  • the monitoring of the database can be implemented more flexibly and freely, so that the database can be monitored more intelligently.
  • FIG. 3 is a schematic block diagram showing a database monitoring apparatus corresponding to the database monitoring method in the first embodiment.
  • the database monitoring apparatus includes a temporary table creation module 10, a data scan instruction acquisition module 20, a data scan result acquisition and storage module 30, a data monitoring instruction acquisition module 40, a target data transmission module 50, and a target data deletion module. 60 and target data analysis and storage module 70.
  • the temporary table creation module 10, the data scan instruction acquisition module 20, the data scan result acquisition and storage module 30, the data monitoring instruction acquisition module 40, the target data transmission module 50, the target data deletion module 60, and the target data analysis and storage module 70 The implementation functions are in one-to-one correspondence with the steps corresponding to the database monitoring method in the embodiment. To avoid redundancy, the present embodiment is not described in detail.
  • the temporary table creation module 10 is used to create a temporary table in the SQL database.
  • the data scan instruction acquisition module 20 is configured to acquire a data scan instruction sent by the local server.
  • the data scan result obtaining and storing module 30 is configured to obtain a corresponding data scan result from the SQL database based on the data scan instruction, and store the data scan result in the temporary table.
  • the data monitoring instruction obtaining module 40 is configured to acquire a data monitoring instruction sent by the local server, where the data monitoring instruction includes a monitoring period.
  • the target data sending module 50 is configured to obtain, as the target data, the data scan result in the monitoring period from the temporary table, and send the target data to the local server.
  • the target data deleting module 60 is configured to delete the target data stored in the temporary table.
  • the data scan instruction includes a full table scan instruction and/or an implicit conversion scan instruction
  • the full table scan instruction includes a full table scan period
  • the implicit conversion scan instruction includes an implicit conversion scan period
  • the data scan result acquisition and storage module 30 includes a full table scan result acquisition and storage unit 31, an implicit conversion scan result acquisition and storage unit 32.
  • the full table scan result obtaining and storing unit 31 is configured to perform a full table scan query in each full table scan cycle based on the full table scan instruction, obtain a corresponding full table scan result from the SQL database, and store the full table scan result. In the temporary table.
  • the implicit conversion scan result acquisition and storage unit 32 performs an implicit conversion scan query on each implicit conversion scan cycle based on the implicit conversion scan instruction, and obtains a corresponding implicit conversion scan result from the SQL database, and implicitly The conversion scan results are stored in a temporary table.
  • the data scan instruction is a timing instruction
  • the timing instruction includes a program trigger time and a program ID.
  • the data scan result acquisition and storage module 30 further includes a program trigger time judging unit 33.
  • the program triggering time judging unit 33 is configured to acquire the current time of the system, and when the current time of the system is the program triggering time, the full table scanning program and/or the implicit conversion scanning program corresponding to the program ID are called, and are obtained from the SQL database. Corresponding full table scan results and/or implicit conversion scan results.
  • the full table scan result acquisition and storage unit 31 is configured to perform a full table scan query in each full table scan cycle based on the full table scan instruction, skipping the full table corresponding to the existing full table scan defect data type. Scan the data, get the full table scan results, and store the full table scan results in a temporary table.
  • the implicit conversion scan result acquisition and storage unit 32 performs an implicit conversion scan query for each implicit conversion scan cycle based on the implicit conversion scan instruction, skipping the corresponding implicit conversion conversion data type. Implicitly convert the scan data, obtain the implicit conversion scan results, and store the implicit conversion scan results in a temporary table.
  • the target data analysis and storage module 70 includes a target data analysis unit 71 and a target data storage unit 72.
  • the target data analyzing unit 71 is configured to obtain a data analysis result formed by the local server based on the target data, and the data analysis result includes the existing defect data type.
  • the target data storage unit 72 is for storing the existing defect data types in the database.
  • the embodiment provides a computer readable storage medium, where the computer readable storage medium is stored with the computer readable instructions.
  • the database monitoring method in Embodiment 1 is implemented. Let me repeat.
  • the functions of the modules/units in the database monitoring apparatus in Embodiment 2 are implemented when the computer readable instructions are executed by the processor. To avoid repetition, details are not described herein again.
  • FIG. 4 is a schematic diagram of a terminal device according to an embodiment of the present application.
  • the terminal device 80 of this embodiment includes a processor 81, a memory 82, and computer readable instructions 83 stored in the memory 82 and operable on the processor 81.
  • the processor 81 implements the steps of the database monitoring method of the embodiment 1 when the computer readable instructions 83 are executed, such as steps S10, S20, S30, S40, and S50 shown in FIG.
  • the processor 81 executes the computer readable instructions 83
  • the functions of the modules/units in the foregoing device embodiments are implemented, such as the temporary table creation module 10, the data scan instruction acquisition module 20, the data scan result acquisition and storage shown in FIG.
  • computer readable instructions 83 may be partitioned into one or more modules/units, one or more modules/units being stored in memory 82 and executed by processor 81 to complete the application.
  • the one or more modules/units may be an instruction segment of a series of computer readable instructions 83 capable of performing a particular function for describing the execution of computer readable instructions 83 in the terminal device 80.
  • the computer readable instructions 83 may be divided into a temporary table creation module 10, a data scan instruction acquisition module 20, a data scan result acquisition and storage module 30, a data monitoring instruction acquisition module 40, and a target data transmission module 50.
  • the terminal device 80 can be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the terminal device may include, but is not limited to, a processor 81, a memory 82. It will be understood by those skilled in the art that FIG. 4 is merely an example of the terminal device 80 and does not constitute a limitation of the terminal device 80, and may include more or less components than those illustrated, or may combine certain components or different components.
  • the terminal device may further include an input/output device, a network access device, a bus, and the like.
  • the processor 81 may be a central processing unit (CPU), or may be other general-purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the memory 82 may be an internal storage unit of the terminal device 80, such as a hard disk or a memory of the terminal device 80.
  • the memory 82 may also be an external storage device of the terminal device 80, such as a plug-in hard disk provided on the terminal device 80, a smart memory card (SMC), a Secure Digital (SD) card, and a flash memory card (Flash). Card) and so on.
  • the memory 82 may also include both an internal storage unit of the terminal device 80 and an external storage device.
  • Memory 82 is used to store computer readable instructions as well as other programs and data required by the terminal device.
  • the memory 82 can also be used to temporarily store data that has been output or is about to be output.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated modules/units if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium.
  • the present application implements all or part of the processes in the foregoing embodiments, and may also be implemented by computer readable instructions, which may be stored in a computer readable storage medium.
  • the computer readable instructions when executed by a processor, may implement the steps of the various method embodiments described above.
  • the computer readable instructions comprise computer readable instruction code, which may be in the form of source code, an object code form, an executable file or some intermediate form or the like.
  • the computer readable storage medium may include any entity or device capable of carrying the computer readable instruction code, a recording medium, a USB flash drive, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read only memory (ROM, Read- Only Memory), Random Access Memory (RAM), electrical carrier signals, telecommunications signals, and software distribution media. It should be noted that the content contained in the computer readable storage medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in a jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, computer readable The storage medium does not include an electrical carrier signal and a telecommunication signal.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Debugging And Monitoring (AREA)

Abstract

一种数据库监控方法、装置、终端设备(80)及存储介质。该数据库监控方法包括:在SQL数据库中创建临时表(S10);获取本地服务器发送的数据扫描指令(S20);基于所述数据扫描指令,从所述SQL数据库中获取对应的数据扫描结果,并将所述数据扫描结果存储在所述临时表中(S30);获取本地服务器发送的数据监控指令,所述数据监控指令包括监控时段(S40);从所述临时表中获取所述监控时段内的数据扫描结果作为目标数据,将所述目标数据发送给所述本地服务器(S50)。该数据库监控方法能够对数据库中存储时效较短的数据进行长久保存并予以监控,基于监控结果提高数据库系统的性能。

Description

数据库监控方法、装置、终端设备及存储介质
本专利申请以2018年01月08日提交的申请号为201810014421.8,名称为“数据库监控方法、装置、终端设备及存储介质”的中国发明专利申请为基础,并要求其优先权。
技术领域
本申请涉及数据库领域,尤其涉及一种数据库监控方法、装置、终端设备及存储介质。
背景技术
全表扫描和隐式转换是SQL数据库中用于查询数据的两种方式,其中,全表扫描是数据库服务器用来搜寻表的每一条记录的过程,直到所有符合给定条件的记录返回为止,一般用于对无索引的表进行查询。隐式转换是直接将一种数据类型赋值给另外一个数据类型。在SQL数据库中查询数据时,通常需要采用SQL指令进行查询,该SQL(Structured Query Language结构化查询语言)指令执行过程中会产生SQL执行计划,SQL指令和相应的SQL执行计划缓存于SQL数据库的性能表v$sql和性能表v$sql_plan中,可以通过查看性能表v$sql和性能表v$sql_plan中的SQL指令和相应的SQL执行计划来初步预测SQL数据库性能。全表扫描和隐式转换均会对SQL数据库性能产生严重影响,通过性能表v$sql和性能表v$sql_plan中的SQL指令和相应的SQL执行计划可以初步预测SQL性能,但是SQL指令和相应的SQL执行计划在性能表v$sql和性能表v$sql_plan中缓存超过一天时将会被自动删除,无法实现长期监控。
发明内容
本申请实施例提供一种数据库监控方法、装置、终端设备及存储介质,以解决对数据库中存储时效超过一天的数据无法进行监控的问题。
第一方面,本申请实施例提供一种数据库监控方法,包括:
在SQL数据库中创建临时表;
获取本地服务器发送的数据扫描指令;
基于所述数据扫描指令,从所述SQL数据库中获取对应的数据扫描结果,并将所述数 据扫描结果存储在所述临时表中;
获取本地服务器发送的数据监控指令,所述数据监控指令包括监控时段;
从所述临时表中获取所述监控时段内的数据扫描结果作为目标数据,将所述目标数据发送给所述本地服务器。
第二方面,本申请实施例提供一种数据库监控装置,包括:
临时表创建模块,用于在SQL数据库中创建临时表;
数据扫描指令获取模块,用于获取本地服务器发送的数据扫描指令;
数据扫描结果获取和存储模块,用于基于所述数据扫描指令,从所述SQL数据库中获取对应的数据扫描结果,并将所述数据扫描结果存储在所述临时表中;
数据监控指令获取模块,用于获取本地服务器发送的数据监控指令,所述数据监控指令包括监控时段;
目标数据发送模块,用于从所述临时表中获取所述监控时段内的数据作为目标数据,将所述目标数据发送给所述本地服务器。
第三方面,本申请实施例提供一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:
在SQL数据库中创建临时表;
获取本地服务器发送的数据扫描指令;
基于所述数据扫描指令,从所述SQL数据库中获取对应的数据扫描结果,并将所述数据扫描结果存储在所述临时表中;
获取本地服务器发送的数据监控指令,所述数据监控指令包括监控时段;
从所述临时表中获取所述监控时段内的数据扫描结果作为目标数据,将所述目标数据发送给所述本地服务器。
第四方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如下步骤:
在SQL数据库中创建临时表;
获取本地服务器发送的数据扫描指令;
基于所述数据扫描指令,从所述SQL数据库中获取对应的数据扫描结果,并将所述数据扫描结果存储在所述临时表中;
获取本地服务器发送的数据监控指令,所述数据监控指令包括监控时段;
从所述临时表中获取所述监控时段内的数据扫描结果作为目标数据,将所述目标数据发送给所述本地服务器。
本申请实施例提供的数据库监控方法、装置、终端设备及存储介质中,首先在SQL数据库中创建临时表,通过在SQL数据库中创建临时表,以存储SQL数据库对应的性能表中缓存不能超过一天的数据。具体地,在获取本地服务器发送的数据扫描指令后,基于该数据扫描指令,从SQL数据库中获取对应的数据扫描结果,并将数据扫描结果存储在临时表中,以存储性能表v$sql中的SQL指令和性能表v$sql_plan中相应的SQL执行计划。再获取本地服务器发送的数据监控指令,该数据监控指令包括监控时段,从临时表中获取监控时段内的数据扫描结果作为目标数据,将该目标数据发送给本地服务器,以实现对SQL数据库中存储时效较短的数据的监控和保存,提高数据库的性能。该数据库监控方法可对缓存在SQL数据库性能表v$sql和性能表v$sql_plan中超过一天的相关数据进行监控,实现对数据库的长期监控。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例1中数据库监控方法的一流程图。
图2是本申请实施例1中数据库监控方法中一个具体实施方式的一流程图。
图3是本申请实施例2中数据库监控装置的一原理框图。
图4是本申请实施例4中终端设备的一示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
实施例1
图1示出本实施例中数据库监控方法的流程图。该数据库监控方法应用在安装有数据 库的终端设备中,用于对数据进行监控,提高数据库系统性能。如图1所示,该数据库监控方法包括如下步骤:
S10:在SQL数据库中创建临时表。
其中,SQL数据库是基于SQL的数据库。SQL是专为数据库而建立的操作命令集,是一种功能齐全的数据库语言,用于管理数据库。SQL数据库中的SQL指令和相应的SQL执行计划都会缓存到SQL数据库的性能表中。具体地,SQL指令缓存在性能表v$sql中,SQL执行计划缓存在性能表v$sql_plan中。然而,SQL指令及其相应的SQL执行计划在SQL数据库的性能表v$sql和性能表v$sql_plan中的储存时效均只为一天,超过一天的SQL指令和相应的SQL执行计划会从SQL数据库的性能表v$sql和性能表v$sql_plan中被自动删除。
临时表是在SQL数据库中创建的一个数据表,在SQL数据库中创建临时表,该临时表用于存储对SQL数据库中的性能表v$sql和性能表v$sql_plan进行扫描后的数据扫描结果。
在一个具体实施方式中,在SQL数据库中创建临时表,是指创建与SQL数据库中的性能表v$sql和性能表v$sql_plan相连的临时表,用以存储性能表v$sql中的SQL指令和性能表v$sql_plan中相应的SQL执行计划,以延长SQL指令和相应的SQL执行计划的存储时效。
S20:获取本地服务器发送的数据扫描指令。
其中,数据扫描指令是用于对数据库中的数据进行扫描的指令。本地服务器是与用户通过客户端进行信息交互的服务器,本地服务器在接收客户端发送的数据扫描指令后,会将该数据扫描指令发送给安装有数据库的终端设备,以使该终端设备的数据库获取到本地服务器发送的数据扫描指令。本实施例中,数据扫描指令具体指对性能表v$sql中缓存的SQL指令和性能表v$sql_plan中缓存的对应SQL执行计划进行扫描的指令,以保证数据扫描指令和被扫描的数据之间的对应。
S30:基于数据扫描指令,从SQL数据库中获取对应的数据扫描结果,并将数据扫描结果存储在临时表中。
其中,数据扫描结果是指依据数据扫描指令对相应的性能表进行扫描而得到的数据。在获取到本地服务器发送的数据扫描指令后,基于数据扫描指令扫描SQL数据库,以获取数据扫描结果并存储在临时表中,以避免数据扫描指令或其对应的数据扫描结果因超过性能表的缓存期而丢失。在数据扫描指令是对性能表v$sql中缓存的SQL指令和性能表 v$sql_plan中缓存的SQL执行计划进行扫描的指令时,可分别对SQL数据库中的性能表v$sql和性能表v$sql_plan进行扫描,获取对应的数据扫描结果,并将获取到的扫描结果存储在步骤S10中创建的临时表中。在将数据扫描结果存储在临时表之后,即使超过一天的SQL指令和相应的SQL执行计划从SQL数据库的性能表v$sql和性能表v$sql_plan中被自动删除,也可以通过存储在临时表中的数据扫描结果来获取对应的数据。
S40:获取本地服务器发送的数据监控指令,数据监控指令包括监控时段。
其中,数据监控指令是指用于对临时表中的数据扫描结果进行监控的指令。监控时段用于选择需要对哪个时间段的数据进行监控。通过监控时段的设置,可以在临时表中快速定位到数据监控指令需要监控的数据。
在一个实施方式中,监控时段包括当前时间和监控时长。其中,当前时间是指接收到数据监控指令时系统的当前时间。监控时长是指对临时表中的数据扫描结果进行监控的时间长度。例如,接收到数据监控指令时系统的当前时间为2017年10月20日12:00,而监控时长是24小时,则此时数据监控指令中的监控时段即是指从2017年10月19日12:00至2017年10月20日12:00这24小时。
S50:从临时表中获取监控时段内的数据扫描结果作为目标数据,将目标数据发送给本地服务器。
其中,目标数据是指监控时段内的临时表中对应的数据扫描结果。目标数据根据监控时段来获取,因此不同监控时段获取的目标数据不一样,以确保目标数据与监控时段的对应,可以通过监控时段的选择来获取实际需要的目标数据,提高该数据库监控方法的灵活性。本实施例中,将目标数据发送给本地服务器,以使本地服务器获取所要监控的目标数据,并将该目标数据发送给客户端,以使相应的用户可通过客户端查看该目标数据。
在一具体实施方式中,可以在本地服务器中基于java语言创建一本地程序,通过本地程序向安装数据库的终端设备发送数据扫描指令,获取基于该数据扫描指令对临时表进行扫描而获取新产生的数据扫描结果,并存储于本地服务器预先创建的数据表中,以实现将临时表中的数据扫描结果长期有效地保存到本地服务器。
优选地,本地服务器预先创建的数据表可以根据数据监控指令中监控时段所体现的时间段命名,根据该时间段对得到的数据表命名有助于快速查找到相对应的目标数据。
例如,在一个数据监控指令中,监控时段是从2017年10月19日12:00至2017年10月20日12:00这24小时。则可以将对应的数据表命名为:2017.10.20.12.00-2017.10.21.12.00。通过这种命名方式,可以方便快速地在本地服务器中查找到相对应的目标数据。
优选地,可以设置每天定时执行一次该本地程序,以实现对临时表中数据扫描结果的自动提取,无需人工进行操作,实现数据的自动转移和保存。
本申请实施例提供的数据库监控方法中,首先在SQL数据库中创建临时表,通过在SQL数据库中创建临时表,以存储SQL数据库对应的性能表中缓存不能超过一天的数据。具体地,在获取本地服务器发送的数据扫描指令后,基于该数据扫描指令,从SQL数据库中获取对应的数据扫描结果,并将数据扫描结果存储在临时表中,以存储性能表v$sql中的SQL指令和性能表v$sql_plan中相应的SQL执行计划。再获取本地服务器发送的数据监控指令,该数据监控指令包括监控时段,从临时表中获取监控时段内的数据扫描结果作为目标数据,将该目标数据发送给本地服务器,以实现对SQL数据库中存储时效较短的数据的监控和保存,提高数据库的性能。该数据库监控方法可对SQL数据库性能表v$sql和性能表v$sql_plan中超过一天的相关数据进行监控,实现对数据库的长期监控。
在一个具体实施方式中,在将目标数据发送给本地服务器(即步骤S50)之后,数据库监控方法还包括:
S60:删除临时表中存储的目标数据。
临时表中的目标数据发送给本地服务器后,为减少数据库的存储压力,可以删除临时表中存储的已经发送给本地服务器的目标数据,以利于下次定时任务执行时对性能表v$sql中的SQL指令和性能表v$sql_plan中相应的SQL执行计划相关数据进行扫描后的数据扫描结果进行存储,可以及时地释放数据库的存储压力。
在一具体实施方式中,数据扫描指令包括全表扫描指令和/或隐式转换扫描指令,全表扫描指令包括全表扫描周期,隐式转换扫描指令包括隐式转换扫描周期。
其中,全表扫描指令是指对性能表v$sql和性能表v$sql_plan中与全表扫描相关的数据进行扫描的指令。全表扫描周期是指对性能表v$sql和性能表v$sql_plan中与全表扫描相关的数据进行扫描的时间间隔。隐式转换扫描指令是指对性能表v$sql和性能表v$sql_plan中与隐式转换相关的数据进行扫描的指令。隐式转换扫描周期是指对性能表v$sql和性能表v$sql_plan中与隐式转换相关的数据进行扫描的时间间隔。
在本实施方式中,基于数据扫描指令,从SQL数据库中获取对应的数据扫描结果,并将数据扫描结果存储在临时表中(即步骤S30)具体包括如下三种处理过程。
第一种处理过程具体为包括全表扫描查询的过程,即当数据扫描指令包括全表扫描指令时,步骤S30具体包括:基于全表扫描指令,在每个全表扫描周期执行一次全表扫描查询,从SQL数据库中获取对应的全表扫描结果,并将全表扫描结果存储在临时表中。
其中,全表扫描查询是指对性能表v$sql和性能表v$sql_plan中全表扫描相关数据进行查询和筛选的过程。全表扫描结果是指对性能表v$sql和性能表v$sql_plan中与全表扫描相关的数据进行扫描获得的结果。获取到的全表扫描结果存储在临时表中,以确保超过一天的SQL指令和相应的SQL执行计划从SQL数据库的性能表v$sql和性能表v$sql_plan中被自动删除之后,还可以从临时表中的全表扫描结果来获取对应的数据。
第二种处理过程具体为包括隐式转换扫描查询的过程,即当数据扫描指令包括隐式转换扫描指令时,步骤S30具体包括:基于隐式转换扫描指令,在每个隐式转换扫描周期执行一次隐式转换扫描查询,从SQL数据库中获取对应的隐式转换扫描结果,并将隐式转换扫描结果存储在临时表中。
隐式转换扫描查询是指对性能表v$sql和性能表v$sql_plan中隐式转换扫相关数据进行查询和筛选的过程。隐式转换扫描结果是指对性能表v$sql和性能表v$sql_plan中与隐式转换相关的数据进行扫描获得的结果。获取到的隐式转换扫描结果存储在临时表中,以确保超过一天的SQL指令和相应的SQL执行计划从SQL数据库的性能表v$sql和性能表v$sql_plan中被自动删除之后,还可以从临时表中的隐式转换扫描结果来获取对应的数据。
第三种处理过程包括第一种处理过程和第二种处理过程,既执行全表扫描查询也执行隐式转换扫描查询。
通过全表扫描指令和隐式转换扫描指令,根据对应的扫描周期执行全表扫描查询和隐式转换扫描查询,从SQL数据库中获取对应的全表扫描结果和隐式转换扫描结果,并将全表扫描结果和隐式转换扫描结果存储在临时表中。从整体上对可能影响SQL数据库性能的全表扫描和隐式转换进行监控,可以及时地根据扫描结果对数据库进行监控。
在特定情形中,可能需要针对SQL数据库中特定的某个影响因素进行单独监控,例如只监控全表扫描或隐式转换。此时,数据扫描指令可以只包括其中一种扫描指令,即全表扫描指令或隐式转换扫描指令,从而实现根据数据扫描指令来执行对应的扫描查询(全表扫描查询或隐式转换扫描指令),减少了不必要的扫描过程,提高了扫描速度,进而提高了数据库的监控效率。
在一个实施方式中,可以设置全表扫描周期大于隐式转换扫描周期。根据系统本身的设置特点和实践发现,系统中隐式转换出现的频率高于全表扫描。因此,可以将隐式转换扫描周期设置为更短,以便及时地进行扫描和监控,提高数据库监控的实时性和准确率。此外,将全表扫描的周期设置地更长,可以减轻全表扫描的查询负担,提高整体的扫描效率。
在这个实施方式中,根据全表扫描和隐式转换的特点来合理设置全表扫描周期和隐式转换扫描周期,以合理地分配对应的扫描查询进程,使得该数据库监控方法在监控效率和准确性上达到一个合理地匹配。
例如,可以设定全表扫描周期为10min,基于全表扫描指令,每隔10min执行一次全表扫描查询(通过SQL指令限定全表扫描查询条件),得到全表扫描结果,将全表扫描结果存储在已经创建好的临时表中。
例如,可以设定隐式转换扫描周期为2min,基于隐式转换扫描指令,每隔2min执行一次隐式转换扫描查询(通过SQL指令限定隐式转换查询条件),得到隐式转换扫描结果,将隐式转换扫描结果存储在已经创建好的临时表中。
在一具体实施方式中,如图2所示,在将目标数据发送给本地服务器(即步骤S50)之后,该数据库监控方法还包括:
S71:获取本地服务器发送的基于目标数据形成的数据分析结果,数据分析结果包括已有缺陷数据类型。
将目标数据发送给本地服务器之后,本地服务器会通过客户端显示该目标数据,并接收用户通过客户端上传的数据分析结果,并存储于本地服务器中。已有缺陷数据类型是指在当前时间以前,本地服务器从SQL数据库中获取对应的目标数据经分析后得到的会影响SQL数据库系统性能的数据类型。在数据分析过程中,通过对目标数据进行分析,获得缺陷数据类型。由于每次数据分析所获得的缺陷数据类型均发生在下一次数据监控的当前时间以前,将该当前时间以前已有的缺陷数据类型,称为已有缺陷数据类型。
具体地,可基于数据分析结果找出目标数据预示的SQL缺陷并根据SQL来制定具体的改进方案,最大限度地预防因全表扫描和/或隐式转换引发的严重性能问题。
由于全表扫描是对无索引的表进行查询,针对数据库系统出现的全表扫描现象,可以通过固化索引或者增加索引等方法来避免全表扫描对数据库系统性能的影响。对于全表扫描,对数据库中数据表进行查询时,如果该表数据量小且数据不会再增加,此时全表扫描对数据库系统的性能影响较小,该情形下可以忽略该全表扫描缺陷。如果该表数据量大,此时存在的全表扫描会对数据库系统性能产生影响,该情况下需要对出现的全表扫描对应的SQL指令进行优化。
对于隐式转换,如果某数据库系统中某功能的SQL查询指令存在隐式转换:例如,字段类型为varchar,但是代入的值类型为number。这样会导致索引无法使用,致使SQL执行计划很差,数据库消耗剧增,数据库主机CPU接近100%,在对数据库系统进行操作时 可能会出现白屏现象,在这种情况下,对SQL指令进行修改就可以进行正常索引查询,避免对数据库系统性能造成影响。
S72:将已有缺陷数据类型存储在数据库中。
本地服务器将分析后得到的已有缺陷数据类型发送到数据库中进行存储,数据库在存储了已有缺陷数据类型之后,在后续的数据扫描过程中,可以基于该已有缺陷数据类型调整具体的数据扫描策略,以提高数据扫描的效率。
在一具体实施方式中,在获取本地服务器发送的数据扫描指令的步骤之后,数据库监控方法还包括:基于数据扫描指令,获取已有缺陷数据类型,已有缺陷数据类型包括已有全表扫描缺陷类型和/或已有隐式转换缺陷类型。
其中,已有全表扫描缺陷数据类型是指在当前时间以前,本地服务器从SQL数据库中获取的对应的全表扫描结果经分析后得到的会影响SQL数据库性能的缺陷数据类型。已有隐式转换缺陷数据类型是指在当前时间以前,本地服务器从SQL数据库中获取的对应的隐式转换扫描结果经分析后得到的会影响SQL数据库性能的缺陷数据类型。
由于数据扫描指令包括全表扫描指令和/或隐式转换扫描指令,由步骤S20中基于数据扫描指令,从SQL数据库中获取对应的数据扫描结果具体包括:从SQL数据库中获取对应的全表扫描结果和/或隐式转换扫描结果。
进一步地,从SQL数据库中获取对应的全表扫描结果具体包括:跳过与已有全表扫描缺陷数据类型相对应的全表扫描数据,获取全表扫描结果。
具体地,基于全表扫描指令,在每个全表扫描周期执行一次全表扫描查询,在全表扫描查询的过程中,跳过与已有全表扫描缺陷数据类型相对应的全表扫描数据,获取全表扫描结果,以避免对相同缺陷类型的全表扫描相关数据进行重复扫描和分析,可以减少全表扫描查询时间,提高查询效率。
进一步地,从SQL数据库中获取对应的隐式转换扫描结果具体包括:跳过与已有隐式转换缺陷数据类型相对应的隐式转换扫描数据,获取隐式转换扫描结果。
具体地,基于隐式转换扫描指令,在每个隐式转换扫描周期执行一次隐式转换扫描查询,在隐式转换扫描查询的过程中,跳过与已有隐式转换缺陷数据类型相对应的隐式转换扫描数据,获取隐式转换扫描结果,以避免对相同缺陷类型的隐式转换相关数据进行重复扫描和分析,可以减少隐式转换扫描查询时间,提高查询效率。
在一具体实施方式中,数据扫描指令为定时指令,定时指令包括程序触发时间和程序ID。其中,定时指令是指按照预定的时间执行的指令。程序触发时间是指程序执行的具体 时刻。程序ID是用于识别扫描程序的标识,该扫描程序包括但不限于本实施例中的全表扫描程序和隐式转换扫描程序。
在该具体实施方式中,基于数据扫描指令,从SQL数据库中获取对应的数据扫描结果(即步骤S30)具体包括如下步骤:
获取系统当前时间,在系统当前时间为程序触发时间时,则调用与程序ID相对应的全表扫描程序和/或隐式转换扫描程序,从SQL数据库中获取对应的全表扫描结果和/或隐式转换扫描结果。
全表扫描程序是指全表扫描查询中对性能表v$sql和性能表v$sql_plan中全表扫描相关数据进行扫描的程序代码,该程序代码针对性能表v$sql和性能表v$sql_plan中与全表扫描相关的数据进行查询筛选。隐式转换扫描程序是指隐式转换扫描查询中对性能表v$sql和性能表v$sql_plan中与隐式转换扫相关的数据进行扫描的程序代码,该程序代码针对性能表v$sql和性能表v$sql_plan中与隐式转换相关的数据进行查询筛选。由于程序ID是用于唯一标识程序的标识,通过程序ID可以执行与数据扫描指令对应的程序(全表扫描程序和/或隐式转换扫描程序),以保证基于数据扫描指令,执行相应的程序,以得到需要的扫描结果。
通过获取系统当前时间,对系统当前时间是否为程序触发时间进行判断,以确定数据扫描程序是否应在当前系统时间进行调用。当系统当前时间和程序触发时间相同时,调用与程序ID相对应的全表扫描程序和/或隐式转换扫描程序,通过对性能表v$sql和性能表v$sql_plan进行扫描,获取SQL数据库中对应的全表扫描结果和/或隐式转换扫描结果。
具体地,当数据扫描指令为全表扫描指令时,若获取到的系统当前时间和程序触发时间相同,则调用全表扫描程序,通过对性能表v$sql和性能表v$sql_plan进行全表扫描,获取SQL数据库中的对应的全表扫描结果。当数据扫描指令为隐式转换扫描指令时,若获取到的系统当前时间和程序触发时间相同,则调用隐式转换扫描程序,通过对性能表v$sql和性能表v$sql_plan进行隐式转换扫描,获取SQL数据库中对应的隐式转换扫描结果。当数据扫描指令为全表扫描指令和隐式转换扫描指令时,若获取到的系统当前时间和程序触发时间相同,则调用全表扫描程序和隐式转换扫描程序,通过对性能表v$sql和性能表v$sql_plan进行全表扫描和隐式转换扫描,获取SQL数据库中对应的全表扫描结果和隐式转换扫描结果。
在该具体实施方式中,通过将数据扫描指令设置为定时指令,可以更加灵活、自由地实现对数据库的监控,以便更加智能化地对数据库进行监控。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
实施例2
图3示出与实施例1中数据库监控方法一一对应的数据库监控装置的原理框图。如图3所示,该数据库监控装置包括临时表创建模块10、数据扫描指令获取模块20、数据扫描结果获取和存储模块30、数据监控指令获取模块40、目标数据发送模块50、目标数据删除模块60和目标数据分析与存储模块70。其中,临时表创建模块10、数据扫描指令获取模块20、数据扫描结果获取和存储模块30、数据监控指令获取模块40、目标数据发送模块50、目标数据删除模块60和目标数据分析与存储模块70的实现功能与实施例中数据库监控方法对应的步骤一一对应,为避免赘述,本实施例不一一详述。
临时表创建模块10,用于在SQL数据库中创建临时表。
数据扫描指令获取模块20,用于获取本地服务器发送的数据扫描指令。
数据扫描结果获取和存储模块30,用于基于数据扫描指令,从SQL数据库中获取对应的数据扫描结果,并将数据扫描结果存储在临时表中。
数据监控指令获取模块40,用于获取本地服务器发送的数据监控指令,数据监控指令包括监控时段。
目标数据发送模块50,用于从临时表中获取监控时段内的数据扫描结果作为目标数据,将目标数据发送给本地服务器。
目标数据删除模块60,用于删除临时表中存储的目标数据。
优选地,数据扫描指令包括全表扫描指令和/或隐式转换扫描指令,全表扫描指令包括全表扫描周期,隐式转换扫描指令包括隐式转换扫描周期。
数据扫描结果获取和存储模块30包括全表扫描结果获取和存储单元31、隐式转换扫描结果获取和存储单元32。
全表扫描结果获取和存储单元31用于基于全表扫描指令,在每个全表扫描周期执行一次全表扫描查询,从SQL数据库中获取对应的全表扫描结果,并将全表扫描结果存储在临时表中。
隐式转换扫描结果获取和存储单元32基于隐式转换扫描指令,在每个隐式转换扫描周期执行一次隐式转换扫描查询,从SQL数据库中获取对应的隐式转换扫描结果,并将隐式转换扫描结果存储在临时表中。
优选地,数据扫描指令为定时指令,定时指令包括程序触发时间和程序ID。
数据扫描结果获取和存储模块30还包括程序触发时间判断单元33。
程序触发时间判断单元33,用于获取系统当前时间,在系统当前时间为程序触发时间时,则调用与程序ID相对应的全表扫描程序和/或隐式转换扫描程序,从SQL数据库中获取对应的全表扫描结果和/或隐式转换扫描结果。
优选地,全表扫描结果获取和存储单元31用于基于全表扫描指令,在每个全表扫描周期执行一次全表扫描查询,跳过与已有全表扫描缺陷数据类型相对应的全表扫描数据,获取全表扫描结果,并将全表扫描结果存储在临时表中。
优选地,隐式转换扫描结果获取和存储单元32基于隐式转换扫描指令,在每个隐式转换扫描周期执行一次隐式转换扫描查询,跳过与已有隐式转换缺陷数据类型相对应的隐式转换扫描数据,获取隐式转换扫描结果,并将隐式转换扫描结果存储在临时表中。
优选地,目标数据分析与存储模块70包括目标数据分析单元71和目标数据存储单元72。
目标数据分析单元71用于获取本地服务器发送的基于目标数据形成的数据分析结果,数据分析结果包括已有缺陷数据类型。
目标数据存储单元72用于将已有缺陷数据类型存储在数据库中。
实施例3
本实施例提供一计算机可读存储介质,该计算机可读存储介质上存储有计算机可读指令,该计算机可读指令被处理器执行时实现实施例1中数据库监控方法,为避免重复,这里不再赘述。或者,该计算机可读指令被处理器执行时实现实施例2中数据库监控装置中各模块/单元的功能,为避免重复,这里不再赘述。
实施例4
图4是本申请一实施例提供的终端设备的示意图。如图4所示,该实施例的终端设备80包括:处理器81、存储器82以及存储在存储器82中并可在处理器81上运行的计算机可读指令83。处理器81执行计算机可读指令83时实现实施例1中数据库监控方法的各个的步骤,例如图1所示的步骤S10、S20、S30、S40和S50。或者,处理器81执行计算机可读指令83时实现上述各装置实施例中各模块/单元的功能,例如图3所示临时表创建模块10、数据扫描指令获取模块20、数据扫描结果获取和存储模块30、数据监控指令获取模块40和目标数据发送模块50的功能。
示例性的,计算机可读指令83可以被分割成一个或多个模块/单元,一个或者多个模块/单元被存储在存储器82中,并由处理器81执行,以完成本申请。一个或多个模块/单 元可以是能够完成特定功能的一系列计算机可读指令83的指令段,该指令段用于描述计算机可读指令83在终端设备80中的执行过程。例如,计算机可读指令83可以被分割成临时表创建模块10、数据扫描指令获取模块20、数据扫描结果获取和存储模块30、数据监控指令获取模块40和目标数据发送模块50。
终端设备80可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。终端设备可包括,但不仅限于,处理器81、存储器82。本领域技术人员可以理解,图4仅仅是终端设备80的示例,并不构成对终端设备80的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如终端设备还可以包括输入输出设备、网络接入设备、总线等。
所称处理器81可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
存储器82可以是终端设备80的内部存储单元,例如终端设备80的硬盘或内存。存储器82也可以是终端设备80的外部存储设备,例如终端设备80上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,存储器82还可以既包括终端设备80的内部存储单元也包括外部存储设备。存储器82用于存储计算机可读指令以及终端设备所需的其他程序和数据。存储器82还可以用于暂时地存储已经输出或者将要输出的数据。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机可读指令来指令相关的硬件来完成,所述的 计算机可读指令可存储于一计算机可读存储介质中,该计算机可读指令在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机可读指令包括计算机可读指令代码,所述计算机可读指令代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读存储介质可以包括:能够携带所述计算机可读指令代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读存储介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读存储介质不包括是电载波信号和电信信号。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种数据库监控方法,其特征在于,包括:
    在SQL数据库中创建临时表;
    获取本地服务器发送的数据扫描指令;
    基于所述数据扫描指令,从所述SQL数据库中获取对应的数据扫描结果,并将所述数据扫描结果存储在所述临时表中;
    获取本地服务器发送的数据监控指令,所述数据监控指令包括监控时段;
    从所述临时表中获取所述监控时段内的数据扫描结果作为目标数据,将所述目标数据发送给所述本地服务器。
  2. 如权利要求1所述的数据库监控方法,其特征在于,在所述将所述目标数据发送给所述本地服务器的步骤之后,所述数据库监控方法还包括如下步骤:
    删除所述临时表中存储的所述目标数据。
  3. 如权利要求1所述的数据库监控方法,其特征在于,所述数据扫描指令包括全表扫描指令和/或隐式转换扫描指令,所述全表扫描指令包括全表扫描周期,所述隐式转换扫描指令包括隐式转换扫描周期;
    所述基于所述数据扫描指令,从所述SQL数据库中获取对应的数据扫描结果,并将所述数据扫描结果存储在所述临时表中,包括:
    基于所述全表扫描指令,在每个所述全表扫描周期执行一次全表扫描查询,从所述SQL数据库中获取对应的全表扫描结果,并将所述全表扫描结果存储在所述临时表中;和/或,
    基于所述隐式转换扫描指令,在每个所述隐式转换扫描周期执行一次隐式转换扫描查询,从所述SQL数据库中获取对应的隐式转换扫描结果,并将所述隐式转换扫描结果存储在所述临时表中。
  4. 如权利要求1所述的数据库监控方法,其特征在于,在所述将所述目标数据发送给所述本地服务器的步骤之后,所述数据库监控方法还包括:
    获取本地服务器发送的基于所述目标数据形成的数据分析结果,所述数据分析结果包括已有缺陷数据类型;
    将所述已有缺陷数据类型存储在数据库中。
  5. 如权利要求3所述的数据库监控方法,其特征在于,在所述获取本地服务器发送的 数据扫描指令的步骤之后,所述数据库监控方法还包括:基于所述数据扫描指令,获取已有缺陷数据类型,所述已有缺陷数据类型包括已有全表扫描缺陷数据类型和/或已有隐式转换缺陷数据类型;
    所述从所述SQL数据库中获取对应的全表扫描结果,包括:
    跳过与所述已有全表扫描缺陷数据类型相对应的全表扫描数据,获取所述全表扫描结果;
    所述从所述SQL数据库中获取对应的隐式转换扫描结果,包括:
    跳过与所述已有隐式转换缺陷数据类型相对应的隐式转换扫描数据,获取所述隐式转换扫描结果。
  6. 如权利要求1所述的数据库监控方法,其特征在于,所述数据扫描指令为定时指令,所述定时指令包括程序触发时间和程序ID;
    所述基于所述数据扫描指令,从所述SQL数据库中获取对应的数据扫描结果,包括:
    获取系统当前时间,在所述系统当前时间为所述程序触发时间时,则调用与所述程序ID相对应的全表扫描程序和/或隐式转换扫描程序,从所述SQL数据库中获取对应的全表扫描结果和/或隐式转换扫描结果。
  7. 一种数据库监控装置,其特征在于,包括:
    临时表创建模块,用于在SQL数据库中创建临时表;
    数据扫描指令获取模块,用于获取本地服务器发送的数据扫描指令;
    数据扫描结果获取和存储模块,用于基于所述数据扫描指令,从所述SQL数据库中获取对应的数据扫描结果,并将所述数据扫描结果存储在所述临时表中;
    数据监控指令获取模块,用于获取本地服务器发送的数据监控指令,所述数据监控指令包括监控时段;
    目标数据发送模块,用于从所述临时表中获取所述监控时段内的数据作为目标数据,将所述目标数据发送给所述本地服务器。
  8. 如权利要求7所述的数据库监控装置,其特征在于,所述数据扫描指令为定时指令,所述定时指令包括程序触发时间和程序ID;
    所述数据扫描结果获取和存储模块包括:
    程序触发时间判断单元,用于获取系统当前时间,在所述系统当前时间为所述程序触发时间时,则调用与所述程序ID相对应的所述数据扫描指令,从所述SQL数据库中获取对应的数据扫描结果。
  9. 一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:
    在SQL数据库中创建临时表;
    获取本地服务器发送的数据扫描指令;
    基于所述数据扫描指令,从所述SQL数据库中获取对应的数据扫描结果,并将所述数据扫描结果存储在所述临时表中;
    获取本地服务器发送的数据监控指令,所述数据监控指令包括监控时段;
    从所述临时表中获取所述监控时段内的数据扫描结果作为目标数据,将所述目标数据发送给所述本地服务器。
  10. 如权利要求9所述的终端设备,其特征在于,在所述将所述目标数据发送给所述本地服务器的步骤之后,所述处理器执行所述计算机可读指令时还包括实现如下步骤:
    删除所述临时表中存储的所述目标数据。
  11. 如权利要求9所述的终端设备,其特征在于,所述数据扫描指令包括全表扫描指令和/或隐式转换扫描指令,所述全表扫描指令包括全表扫描周期,所述隐式转换扫描指令包括隐式转换扫描周期;
    所述基于所述数据扫描指令,从所述SQL数据库中获取对应的数据扫描结果,并将所述数据扫描结果存储在所述临时表中,包括:
    基于所述全表扫描指令,在每个所述全表扫描周期执行一次全表扫描查询,从所述SQL数据库中获取对应的全表扫描结果,并将所述全表扫描结果存储在所述临时表中;和/或,
    基于所述隐式转换扫描指令,在每个所述隐式转换扫描周期执行一次隐式转换扫描查询,从所述SQL数据库中获取对应的隐式转换扫描结果,并将所述隐式转换扫描结果存储在所述临时表中。
  12. 如权利要求9所述的终端设备,其特征在于,在所述将所述目标数据发送给所述本地服务器的步骤之后,所述处理器执行所述计算机可读指令时还包括实现如下步骤:
    获取本地服务器发送的基于所述目标数据形成的数据分析结果,所述数据分析结果包括已有缺陷数据类型;
    将所述已有缺陷数据类型存储在数据库中。
  13. 如权利要求11所述的终端设备,其特征在于,在所述获取本地服务器发送的数据 扫描指令的步骤之后,所述处理器执行所述计算机可读指令时还包括实现如下步骤:
    基于所述数据扫描指令,获取已有缺陷数据类型,所述已有缺陷数据类型包括已有全表扫描缺陷数据类型和/或已有隐式转换缺陷数据类型;
    所述从所述SQL数据库中获取对应的全表扫描结果,包括:
    跳过与所述已有全表扫描缺陷数据类型相对应的全表扫描数据,获取所述全表扫描结果;
    所述从所述SQL数据库中获取对应的隐式转换扫描结果,包括:
    跳过与所述已有隐式转换缺陷数据类型相对应的隐式转换扫描数据,获取所述隐式转换扫描结果。
  14. 如权利要求9所述的终端设备,其特征在于,所述数据扫描指令为定时指令,所述定时指令包括程序触发时间和程序ID;
    所述基于所述数据扫描指令,从所述SQL数据库中获取对应的数据扫描结果,包括:
    获取系统当前时间,在所述系统当前时间为所述程序触发时间时,则调用与所述程序ID相对应的全表扫描程序和/或隐式转换扫描程序,从所述SQL数据库中获取对应的全表扫描结果和/或隐式转换扫描结果。
  15. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现如下步骤:
    在SQL数据库中创建临时表;
    获取本地服务器发送的数据扫描指令;
    基于所述数据扫描指令,从所述SQL数据库中获取对应的数据扫描结果,并将所述数据扫描结果存储在所述临时表中;
    获取本地服务器发送的数据监控指令,所述数据监控指令包括监控时段;
    从所述临时表中获取所述监控时段内的数据扫描结果作为目标数据,将所述目标数据发送给所述本地服务器。
  16. 如权利要求15所述的计算机可读存储介质,其特征在于,在所述将所述目标数据发送给所述本地服务器的步骤之后,所述计算机可读指令被处理器执行时还包括实现如下步骤:
    删除所述临时表中存储的所述目标数据。
  17. 如权利要求15所述的计算机可读存储介质,其特征在于,所述数据扫描指令包括全表扫描指令和/或隐式转换扫描指令,所述全表扫描指令包括全表扫描周期,所述隐式转 换扫描指令包括隐式转换扫描周期;
    所述基于所述数据扫描指令,从所述SQL数据库中获取对应的数据扫描结果,并将所述数据扫描结果存储在所述临时表中,包括:
    基于所述全表扫描指令,在每个所述全表扫描周期执行一次全表扫描查询,从所述SQL数据库中获取对应的全表扫描结果,并将所述全表扫描结果存储在所述临时表中;和/或,
    基于所述隐式转换扫描指令,在每个所述隐式转换扫描周期执行一次隐式转换扫描查询,从所述SQL数据库中获取对应的隐式转换扫描结果,并将所述隐式转换扫描结果存储在所述临时表中。
  18. 如权利要求15所述的计算机可读存储介质,其特征在于,在所述将所述目标数据发送给所述本地服务器的步骤之后,所述计算机可读指令被处理器执行时还包括实现如下步骤:
    获取本地服务器发送的基于所述目标数据形成的数据分析结果,所述数据分析结果包括已有缺陷数据类型;
    将所述已有缺陷数据类型存储在数据库中。
  19. 如权利要求17所述的计算机可读存储介质,其特征在于,在所述获取本地服务器发送的数据扫描指令的步骤之后,所述计算机可读指令被处理器执行时还包括实现如下步骤:
    基于所述数据扫描指令,获取已有缺陷数据类型,所述已有缺陷数据类型包括已有全表扫描缺陷数据类型和/或已有隐式转换缺陷数据类型;
    所述从所述SQL数据库中获取对应的全表扫描结果,包括:
    跳过与所述已有全表扫描缺陷数据类型相对应的全表扫描数据,获取所述全表扫描结果;
    所述从所述SQL数据库中获取对应的隐式转换扫描结果,包括:
    跳过与所述已有隐式转换缺陷数据类型相对应的隐式转换扫描数据,获取所述隐式转换扫描结果。
  20. 如权利要求15所述的计算机可读存储介质,其特征在于,所述数据扫描指令为定时指令,所述定时指令包括程序触发时间和程序ID;
    所述基于所述数据扫描指令,从所述SQL数据库中获取对应的数据扫描结果,包括:
    获取系统当前时间,在所述系统当前时间为所述程序触发时间时,则调用与所述程序 ID相对应的全表扫描程序和/或隐式转换扫描程序,从所述SQL数据库中获取对应的全表扫描结果和/或隐式转换扫描结果。
PCT/CN2018/077250 2018-01-08 2018-02-26 数据库监控方法、装置、终端设备及存储介质 WO2019134230A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810014421.8A CN108460079B (zh) 2018-01-08 2018-01-08 数据库监控方法、装置、终端设备及存储介质
CN201810014421.8 2018-01-08

Publications (1)

Publication Number Publication Date
WO2019134230A1 true WO2019134230A1 (zh) 2019-07-11

Family

ID=63221245

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/077250 WO2019134230A1 (zh) 2018-01-08 2018-02-26 数据库监控方法、装置、终端设备及存储介质

Country Status (2)

Country Link
CN (1) CN108460079B (zh)
WO (1) WO2019134230A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109271451B (zh) * 2018-10-12 2021-06-22 武汉达梦数据库有限公司 一种数据库外部链接的提取方法
CN113032277A (zh) * 2021-04-16 2021-06-25 携程旅游网络技术(上海)有限公司 数据查询监测方法、装置、电子设备和存储介质
CN113326270A (zh) * 2021-06-30 2021-08-31 中国平安人寿保险股份有限公司 数据存储方法、装置、设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001006417A1 (en) * 1999-07-20 2001-01-25 Computer Associates Think, Inc. A database system for viewing effects of changes to a index for a query optimization plan
CN1482766A (zh) * 2002-09-13 2004-03-17 华为技术有限公司 一种自动产生网管报表的方法
CN1882906A (zh) * 2003-09-30 2006-12-20 维瑞泰斯操作公司 在数据存储器中保持临时数据的系统和方法
CN103412911A (zh) * 2013-08-02 2013-11-27 中国工商银行股份有限公司 数据库系统的性能监控方法以及装置
CN105740376A (zh) * 2016-01-27 2016-07-06 北京铭万智达科技有限公司 一种微服务中api调用统计和监控的方法
CN105868071A (zh) * 2016-03-23 2016-08-17 乐视网信息技术(北京)股份有限公司 监测数据的处理方法及装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030110153A1 (en) * 2001-12-11 2003-06-12 Sprint Communications Company L.P. Database performance monitoring method and tool
CN101860449B (zh) * 2009-04-09 2014-02-19 华为技术有限公司 一种数据查询方法、装置及系统
CN102063490B (zh) * 2010-12-20 2012-12-19 大唐移动通信设备有限公司 一种数据库分区方法和分区装置
CN106156115B (zh) * 2015-04-07 2019-09-27 中国移动通信集团云南有限公司 一种资源调度方法及装置
CN106156330A (zh) * 2016-07-06 2016-11-23 北京金山安全管理系统技术有限公司 一种数据库适配方法及数据库适配器

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001006417A1 (en) * 1999-07-20 2001-01-25 Computer Associates Think, Inc. A database system for viewing effects of changes to a index for a query optimization plan
CN1482766A (zh) * 2002-09-13 2004-03-17 华为技术有限公司 一种自动产生网管报表的方法
CN1882906A (zh) * 2003-09-30 2006-12-20 维瑞泰斯操作公司 在数据存储器中保持临时数据的系统和方法
CN103412911A (zh) * 2013-08-02 2013-11-27 中国工商银行股份有限公司 数据库系统的性能监控方法以及装置
CN105740376A (zh) * 2016-01-27 2016-07-06 北京铭万智达科技有限公司 一种微服务中api调用统计和监控的方法
CN105868071A (zh) * 2016-03-23 2016-08-17 乐视网信息技术(北京)股份有限公司 监测数据的处理方法及装置

Also Published As

Publication number Publication date
CN108460079B (zh) 2021-03-26
CN108460079A (zh) 2018-08-28

Similar Documents

Publication Publication Date Title
US11550769B2 (en) Data processing method, apparatus, and system
US9298775B2 (en) Changing the compression level of query plans
WO2019134230A1 (zh) 数据库监控方法、装置、终端设备及存储介质
US8554747B2 (en) Active memory expansion in a database environment to query needed/uneeded results
US8417690B2 (en) Automatically avoiding unconstrained cartesian product joins
US8924373B2 (en) Query plans with parameter markers in place of object identifiers
US11366808B2 (en) Query processing method, data source registration method, and query engine
US11169994B2 (en) Query method and query device
US20150310129A1 (en) Method of managing database, management computer and storage medium
US20240045860A1 (en) Data query method and system, heterogeneous acceleration platform, and storage medium
US20140201192A1 (en) Automatic data index establishment method
CN110134335B (zh) 一种基于键值对的rdf数据管理方法、装置及存储介质
US11308060B2 (en) Method, apparatus, device and storage medium for managing index
US9104567B2 (en) Memory-leak identification
CN115168338A (zh) 数据处理方法、电子设备及存储介质
WO2019148657A1 (zh) 关联环境测试方法、电子装置及计算机可读存储介质
CN113568924A (zh) 一种数据处理方法、装置、电子设备及存储介质
US20110296108A1 (en) Methods to Estimate Existing Cache Contents for Better Query Optimization
US9576004B1 (en) Free space management in databases
CN110389966B (zh) 一种信息处理方法及装置
CN113268487B (zh) 数据统计方法、装置及计算机可读存储介质
WO2024078080A1 (zh) 数据库查询方法、装置、设备及介质
WO2024041221A1 (zh) 一种选择率估算方法及估算装置
CN117131230A (zh) 数据血缘分析方法、装置、设备及存储介质
CN117472923A (zh) 同一实体支持多种差异化结构并存的方法、计算机装置、计算机可读存储介质

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 16.10.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18898565

Country of ref document: EP

Kind code of ref document: A1