WO2015145761A1 - データベース管理システム、計算機、データベース管理方法 - Google Patents
データベース管理システム、計算機、データベース管理方法 Download PDFInfo
- Publication number
- WO2015145761A1 WO2015145761A1 PCT/JP2014/059274 JP2014059274W WO2015145761A1 WO 2015145761 A1 WO2015145761 A1 WO 2015145761A1 JP 2014059274 W JP2014059274 W JP 2014059274W WO 2015145761 A1 WO2015145761 A1 WO 2015145761A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- query
- execution
- performance
- database management
- management system
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2453—Query optimisation
- G06F16/24534—Query rewriting; Transformation
- G06F16/24542—Plan optimisation
- G06F16/24544—Join order optimisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2453—Query optimisation
- G06F16/24532—Query optimisation of parallel queries
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2453—Query optimisation
- G06F16/24534—Query rewriting; Transformation
- G06F16/24542—Plan optimisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2453—Query optimisation
- G06F16/24534—Query rewriting; Transformation
- G06F16/24542—Plan optimisation
- G06F16/24545—Selectivity estimation or determination
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2453—Query optimisation
- G06F16/24534—Query rewriting; Transformation
- G06F16/24549—Run-time optimisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
- G06F16/24552—Database cache management
Definitions
- the present invention generally relates to processing request processing, for example, database management technology.
- DBMS database management system
- DB database management system
- a technique disclosed in Patent Document 1 is known as a technique for shortening a data read waiting time in execution of one query.
- the DBMS multiplexes data read requests by dynamically generating and executing tasks in parallel each time data read required for query execution is performed. In task execution, some of the upper limit of system performance is exhibited.
- System performance includes the performance of a computer including a DBMS, and may further include the performance of a computer system including the computer and other devices.
- System performance includes, for example, CPU (Central Processing Unit) performance and I / O performance.
- CPU Central Processing Unit
- I / O performance when executing one query, the DBMS dynamically generates tasks and executes them in parallel, thereby multiplexing data read requests.
- CPU performance can be exhibited up to the upper limit by executing tasks in parallel, and I / O performance can be achieved up to the upper limit by multiplexing data read requests.
- system performance is not necessarily exhibited to the upper limit in the processing of one query.
- Such a problem may exist not only in a DBMS that processes a query but also in a system such as another computer program or a computer system that processes a processing request such as a query.
- the DBMS determines whether or not the performance, which is the performance exhibited by executing the query being executed, continuously satisfies a predetermined condition based on the execution state of the DBMS. If the result of the determination is true, if there is a query waiting for execution, the DBMS starts executing the query waiting for execution before the execution of the query being executed is completed.
- the system performance can be demonstrated up to the upper limit as much as possible.
- Example 1 shows a configuration of a computer system according to a first embodiment. It is an example of the 1st query concerning Example 1. It is an example of the 2nd query concerning Example 1. 7 shows an example of a query execution plan for a first query according to the first embodiment. 7 shows an example of query execution plan information according to the first embodiment. 10 shows an example of management of the execution state of a DBMS according to the first embodiment. 3 is a flowchart illustrating a flow of query execution start determination according to the first embodiment. 3 is a flowchart illustrating a flow of tail phase determination according to the first embodiment. 3 is a flowchart showing a flow of performance margin determination according to the first embodiment. 12 illustrates an example of management of an execution state of a DBMS according to the second embodiment. 10 is a flowchart illustrating a flow of tail phase determination according to the second embodiment. The structure of the computer system concerning Example 3 is shown.
- the issuer of a query to a database management system may be a computer program inside the DBMS or an external computer program.
- the query issuer may be a computer program (for example, an application program) executed in a database server having a DBMS (hereinafter referred to as DB server), or executed by a device such as a client computer connected to the DB server. It may be a computer program (for example, an application program).
- FIG. 1 shows a configuration of a computer system according to the first embodiment.
- the DB server 101 is an example of a computer, and may be, for example, a personal computer, a workstation, or a mainframe, or may be a virtual computer configured by a virtualization program in these computers.
- the DB server 101 includes a network adapter 115, a memory 102, a storage device 117, and a CPU 116 connected to them.
- the CPU 116 executes a computer program.
- the computer program executed by the CPU 116 is, for example, an operating system (hereinafter referred to as OS) 114, the DBMS 104, and the application program 103 that issues a query to the DBMS 104.
- OS operating system
- the memory 102 is, for example, a volatile DRAM (Dynamic Random-Access Memory) or the like, and temporarily stores a program executed by the CPU 116 and data used by the program.
- the storage device 117 is, for example, a nonvolatile magnetic disk, flash memory, or the like, and stores a program and data used by the program.
- the network adapter 115 connects the communication network 403 and the DB server 101.
- the application program 103 may operate not on the DB server 101 but on another computer (not shown) connected to the communication network 403.
- the CPU 116 may be an example of a processor connected to the network adapter 115, the memory 102, and the like.
- the DB server 101 may include a plurality of at least one element of the CPU 116, the memory 102, the storage device 117, and the network adapter 115 in order to improve performance and redundancy.
- the DB server 101 may include an input device (not shown) such as a keyboard and a pointing device and an output device (not shown) such as a liquid crystal display.
- the input device and the output device (for example, a display device) may be connected to the CPU 116.
- the input device and the output device may be integrated.
- the DBMS 104 executes a query issued from the application program 103, and in executing the query, in order to read data from the database (hereinafter referred to as DB) 122 or write data to the DB 122,
- DB database
- An I / O request for the external storage device 118 that stores the DB 122 is issued to the OS 114.
- the OS 114 accepts the input / output request and issues an input / output request to the external storage apparatus 118.
- the external storage device 118 is a device having a storage device group 121 including a plurality of storage devices, and is, for example, a disk array device, but may instead be a single storage device.
- the external storage device 118 stores the DB 122, but may store a program in addition to the data of the DB 122.
- the external storage device 118 receives an input / output request from the DB server 101, reads / writes data according to the input / output request, and returns the result to the DB server 101.
- the external storage apparatus 118 includes a network adapter 119 and a storage controller 120 connected to these in addition to the storage device group 121.
- the network adapter 119 connects the external storage device 118 to the communication network 403 and is connected to the DB server 101 via this.
- a communication protocol via the communication network 403 for example, Fiber Channel (FC), SCSI (Small Computer System Interface), or TCP / IP (Transmission Control Protocol / Internet Protocol) may be employed.
- FC Fiber Channel
- SCSI Small Computer System Interface
- TCP / IP Transmission Control Protocol / Internet Protocol
- the network adapter 115 of the DB server 101 and the network adapter 119 of the external storage device 118 may be called host bus adapters.
- the storage device included in the storage device group 121 is a device having a nonvolatile storage medium, such as a magnetic disk drive, a flash memory drive, and other semiconductor memory drives.
- the storage device group 121 has a RAID (Redundant Array of Independent Disks) mechanism and may store data at a predetermined RAID level. Even if a logical storage device (for example, logical unit, logical volume, file system volume) based on the storage space of the storage device group 121 is provided to the DB server 101 and the DB 122 is stored on the logical storage device. Good.
- the storage controller 120 includes, for example, a memory and a processor, and reads or writes data with the storage device group 121 storing the DB 122 in response to an input / output request from the DB server 101. For example, when the storage controller 120 receives a data read request from the DB server 101, the storage controller 120 reads the data from the storage device group 121 according to the request and returns the read data to the DB server 101.
- the external storage device 118 may have a plurality of components such as the storage controller 120 in order to improve performance and redundancy.
- the DBMS 104 manages the DB 122.
- the DB 122 includes one or more tables 124 and may further include one or more indexes 123.
- Table 124 is a set of one or more records, and each record is composed of one or more columns.
- the index 123 is a data structure created for one or more columns or the like of the table 124, and is for speeding up access to the table 124 by a selection condition including the column or the like targeted by the index 123. is there.
- the table 124 has a data structure that holds information for specifying a record including the value in the table 124 for each target column value.
- As the data structure for example, a B-tree or the like is used.
- As information for specifying a record a physical address, a logical row ID, or the like may be used.
- the DBMS 104 includes a query receiving unit 105, an execution waiting query management unit 106, a query execution plan generation unit 107, a query execution unit 108, and an execution query control unit 110.
- the query receiving unit 105 receives a query issued by the application program 103.
- the query is described by SQL, for example.
- the query reception unit 105 notifies the waiting query management unit 106 that the query has been received.
- An example of the first query is shown in FIG. 2, and an example of the second query is shown in FIG.
- the execution query waiting query management unit 106 manages whether or not each of the one or more queries received by the query reception unit 105 is waiting for execution. Note that a “waiting execution query” is typically an unexecuted query (a query that has never been started), but in addition to an unexecuted query, execution is temporarily suspended.
- the query may be
- the query execution plan generation unit 107 generates a query execution plan including one or more DB operations necessary for executing the query from the query received by the query reception unit 105.
- the query execution plan is information including, for example, the relationship between one or more DB operations and the execution order of DB operations.
- a query execution plan may be represented by a tree structure in which a DB operation is a node and a relation of execution order of DB operations is an edge.
- the query execution plan may be generated for the query when the query is accepted, or not for the query when the query is accepted and generated for the query when the query is started from execution waiting May be.
- the query execution unit 108 executes the query whose execution is started by the execution query control unit 110 according to the query execution plan generated by the query execution plan generation unit 107.
- the query execution unit 108 dynamically generates a task for executing the DB operation, executes the dynamically generated task, and when there are two or more executable tasks, By executing at least two of these two or more tasks in parallel, it is possible to multiplex and issue data read requests.
- the query execution unit 108 may be a query execution unit to which the technique described in Patent Document 1 is applied. Specifically, the query execution unit 108 generates (a) a task for executing a DB operation, and (b) executes the generated task, thereby obtaining data necessary for the DB operation corresponding to the task.
- each of the other DB operations is executed.
- One or more tasks may be newly generated, and (d) (b) and (c) may be performed for each of the one or more newly generated tasks.
- the query execution unit 108 may execute one or more tasks generated in this way in parallel.
- the query execution unit 108 may execute at least two of the two or more tasks in parallel.
- the query execution unit 108 may execute a plurality of DB operations in one task. Further, the query execution unit 108 may execute the next DB operation in the same task without generating a new task each time.
- a user thread realized by a library or the like may be used in addition to a process or kernel thread realized by the OS 114.
- the query execution unit 108 includes a context management unit 109.
- the context management unit 109 manages the context of information indicating the contents to be executed in the task. For example, the query execution unit 108 executes a DB operation in the query execution plan by dynamically generating a context according to the query execution plan and executing a task based on the context.
- the context management unit 109 manages contexts.
- the context is started to execute next, for example, information (for example, page ID) for specifying a page in the storage device group 121 of the external storage apparatus 118 in which the data address set is stored, and an entry stored in the data address set.
- Information indicating an entry accessed by a task to be executed, and the remaining number of entries accessed by task execution (task generation possible number) may be stored.
- the context management unit 109 may add the context to the management target every time the context is generated, and delete the context from the management target every time the context is deleted.
- the execution query control unit 110 determines whether or not the performance, which is the performance exhibited by continuing the execution of the query being executed based on the execution state of the DBMS 104, continuously satisfies a predetermined condition after a certain point in time. Determine. If the result of the determination is true, if there is a query waiting for execution, the execution query control unit 110 starts executing the query waiting for execution before the execution of the query being executed is completed.
- the execution query control unit 110 includes a query execution start control unit 111.
- the query execution start control unit 111 determines whether to start query execution.
- the execution query control unit 110 determines that the query execution is started, the execution query control unit 110 identifies a query waiting for execution managed by the query waiting query management unit 106 (for example, acquires a query waiting for execution), and identifies the query.
- the transmitted query is transmitted to the query execution unit 108 (for example, the acquired query is passed to the query execution unit 108).
- the query execution start control unit 111 includes an execution information acquisition unit 112 and a server performance acquisition unit 113. The execution information acquisition unit 112 and the server performance acquisition unit 113 will be described later.
- the query reception unit 105, the waiting query management unit 106, the query execution plan generation unit 107, the query execution unit 108, and the execution query control unit 110 described above are realized by the DBMS 104 being executed by the CPU 116. At least a part of processing performed by at least one component may be realized by hardware.
- Computer programs such as the DBMS 104 may be installed in the DB server 101 from the program source.
- the program source may be a storage medium readable by the DB server 101, for example.
- the configuration of the DBMS 104 shown in FIG. 1 is merely an example.
- a certain component may be divided into a plurality of components, and a plurality of components may be integrated into one component.
- FIG. 4A shows an example of the query execution plan of the first query shown in FIG.
- the query execution plan generation unit 107 generates the query execution plan shown in FIG. 4A from the first query shown in FIG.
- Each join operation is a nested loop join.
- the result of the first nested loop join and the result of the first nested loop join in which the extraction result from the Part table is the outer table (joining source) and the extraction result from the Lineitem table is the inner table (joining destination)
- the query execution unit 108 first acquires the storage position of the part table record in which p_type matches “ECONOMY ANODIZED STEEL” using the p_type index, and is stored in the acquired storage position. Read a part table record from the part table. Next, the query execution unit 108 uses the l_partkey index to acquire the storage position of the lineitem table record whose l_partkey matches the p_partkey of the read part table record, and the lineitem table record stored in the acquired storage position Is read from the lineitem table.
- the query execution unit 108 uses the o_orderkey index to acquire the storage position of the orderers table record in which o_orderkey matches l_orderkey of the read lineitem table record, and the orderers table record stored in the acquired storage position Is read from the orders table. Finally, the query execution unit 108 matches all the read records, totals total_profit for each p_name, and sorts the generated total results based on the value of total_profit.
- the query execution plan generation unit 107 calculates an estimated coupling rate for each combined operation when generating a query execution plan, and associates the calculated estimated combined rate with the corresponding combined operation.
- the calculation of the estimated coupling rate may be performed by an element other than the query execution plan generation unit 107 (for example, the execution information acquisition unit 112) instead of the query execution plan generation unit 107. Further, the calculation of the estimated coupling rate may be performed when the query execution plan is generated or may be performed when the query execution is started.
- FIG. 4B shows an example of query execution plan information.
- Query execution plan information is a part of information included in the DBMS 104.
- the query execution plan generated by the query execution plan generation unit 107 is information including a relationship between one or more database operations and the execution order of the database operations, and is stored in the query execution plan information.
- the query execution plan information includes execution plan information and execution state information.
- the execution plan information is information indicating the configuration of the query execution plan. For example, for each DB operation, “Operation” (for example, the name of the DB operation), “Source 1” (information indicating the outer table or the preceding DB operation) , “Source 2” (information representing the inner table or another preceding DB operation), and “Condition” (information representing the condition).
- the execution state information is information representing the execution state of each DB operation and the address of the reserved work area. For example, for each DB operation, “Operation State” (DB operation state (executed, executing or Information indicating “unexecuted)” and “Work area address” (address of the reserved work area). From this query execution plan information, it is possible to know the structure of the query execution plan and whether a work area has been secured for the subsequent DB operation.
- “Operation State” DB operation state (executed, executing or Information indicating “unexecuted)”
- Work area address address of the reserved work area
- FIG. 5 shows an example of management of the execution state of the DBMS 104.
- the context management unit 109 manages, for each node of the query execution plan, the context before execution and the execution being executed among the contexts generated when the query execution unit 108 processes the query according to the query execution plan. For example, when processing a query according to the query execution plan of FIG. 4A, the query execution unit 108 multiplexes data read requests when reading a p_type index and a part table. The context management unit 109 adds a context including the contents of the multiplexed data read request to the part context 504. Further, the query execution unit 108 multiplexes the data read request when reading the l_partkey index and the lineitem table, and the context management unit 109 converts the context including the contents of the multiplexed data read request into a lineitem context) 505.
- the query execution unit 108 multiplexes the data read request when reading the o_orderkey index and the orders table, and the context management unit 109 adds a context including the contents of the multiplexed data read request to the orders context 506. To do.
- Each of the five boxes represented by reference numerals 504 to 508 corresponds to one DB operation.
- the execution information acquisition unit 112 acquires query execution information.
- the query execution information may include an estimated coupling rate of each coupling operation, the number of contexts managed for each specific node of the query execution plan, and memory allocation information.
- the memory allocation information includes, for example, at least execution state information among the information exemplified in FIG. 4B.
- the estimated coupling rate of each coupling operation (nested loop coupling) and the number of contexts managed for each specific node of the query execution plan are acquired through the query execution plan generation unit 107, for example. According to the example of FIG.
- the server performance acquisition unit 113 acquires server performance information using a function provided by the OS 114.
- the server performance information represents server performance (performance index) that is exhibited by executing a query that is being executed, and represents, for example, CPU performance and I / O performance.
- the CPU performance is, for example, a CPU usage rate.
- the I / O performance is, for example, an I / O throughput usage rate and an I / O multiplicity usage rate.
- the CPU usage rate is a ratio of the CPU resource amount used to the allowed CPU resource amount.
- the I / O throughput usage rate is a ratio of the I / O throughput being used (executed) to the allowable I / O throughput (maximum I / O throughput that can be exhibited).
- the I / O multiplicity usage rate is a ratio of the I / O multiplicity used (performed) to the allowed I / O multiplicity (I / O multiplicity that can be exhibited).
- the CPU usage rate is “70%”
- the I / O throughput usage rate is “30%”
- the I / O multiplicity usage rate is “80%”. is there.
- the various usage rates (performance indicators) may be, for example, ratios of various performance values (values that can be acquired using the functions provided by the OS 114) to the upper limit values of the various performance values.
- the upper limit values of the various performance values may be acquired using a function provided by the OS 114, may be input from the user through the above-described input device (not shown), or may be input from the management computer (through the network adapter 115). (Not shown) or the like.
- the query execution start control unit 111 repeatedly (for example, periodically) acquires query execution information from the execution information acquisition unit 112, acquires server performance information from the server performance acquisition unit 113, and acquires the acquired query execution information and server performance. Based on the information, it is determined whether or not to execute the execution waiting query.
- FIG. 6 is a flowchart showing the flow of query execution start determination.
- the query execution start determination may be repeated (for example, periodically).
- the query execution start control unit 111 acquires query execution information by the execution information acquisition unit 112, and determines whether or not the query being executed is in the tail phase based on the acquired query execution information (S601).
- the “tail phase” refers to a phase (CPU usage rate, I / O throughput usage rate) in which the performance exerted by the execution of the executing query from the determination time of S601 to the end time of the executing query decreases.
- a performance value corresponding to at least one performance index, such as I / O multiplicity and memory usage is lower than the performance value at the time of determination in S601).
- the query execution start control unit 111 ends the query execution start determination.
- the query execution start control unit 111 acquires server performance information from the server performance acquisition unit 113, and acquires the acquired server Based on the performance information, it is determined whether there is a surplus in server performance (S603).
- the query execution start control unit 111 ends the query execution start determination.
- the query execution start control unit 111 starts executing the waiting query before the execution of the executing query ends.
- the query whose execution has been started is processed by the query execution unit 108.
- FIG. 7 is a flowchart showing the flow of tail phase determination (S601 in FIG. 6).
- the query execution start control unit 111 Based on the query execution information (particularly, the configuration of the query execution plan, the progress of the query execution plan, and the estimated join rate of each join operation), the query execution start control unit 111 has an estimated join rate greater than 1 from the outermost table. It is determined whether the total number of contexts before and during execution up to the outer table of the join operation is 0 (S701). “The total number of contexts before and during execution from the outermost table to the outer table of the join operation with an estimated join rate greater than 1 is 0” means that the multiplicity of tasks (data read requests) is S701 This means that it does not increase more than the multiplicity at the time of determination.
- the determination in S701 is effective.
- the query execution start control unit 111 When the result of the determination in S701 is false (S701: NO), the query execution start control unit 111 outputs that the query being executed is not in the tail phase as a result of the tail phase determination (S704).
- the query execution start control unit 111 is based on the query execution information (particularly, the configuration of the query execution plan, the progress of the query execution plan, and the memory allocation information). Then, it is determined whether a work area necessary for the subsequent DB operation (unexecuted DB operation) has been secured (S702). This is because if the necessary work area is not secured in the subsequent DB operation, the memory usage may increase from the determination time of S702 when securing such a work area. Therefore, when the determination result in S702 is false (S702: NO), the query execution start control unit 111 outputs that the query being executed is not in the tail phase as a result of the tail phase determination (S704).
- the query execution start control unit 111 When the result of the determination in S702 is true (S702: YES), the query execution start control unit 111 outputs that the query being executed is in the tail phase as a result of the tail phase determination (S703).
- such tail phase determination is generated dynamically by the query execution unit 108 dynamically generating a task for executing a DB operation in the execution of a query as in, for example, Patent Document 1. This is effective when a task is executed and at least two of two or more executable tasks are executed in parallel.
- FIG. 8 is a flowchart showing the flow of the remaining performance determination (S603 in FIG. 6).
- the query execution start control unit 111 When the result of the determination in S801 is true (S801: YES), the query execution start control unit 111 outputs a performance margin as a result of the performance margin determination (S804).
- the query execution start control unit 111 When the result of the determination in S803 is true (S803: YES), the query execution start control unit 111 outputs a performance margin as a result of the performance margin determination (S804).
- the query execution start control unit 111 When the determination result of S802 or S803 is false (S802: NO or S803: NO), the query execution start control unit 111 outputs “no performance margin” as a result of the performance margin determination (S805).
- both tail phase determination and remaining performance determination are performed based on the query execution information. If both determination results are true, the execution waiting query is executed before the execution of the executing query is completed. It is supposed to start. If the query being executed is in the tail phase and the server performance has not reached the upper limit, the server performance can be expected to reach the upper limit as much as possible by starting the execution waiting query before the execution of the execution query is completed. .
- the server performance may include other types of performance (performance index), for example, memory performance (for example, memory usage rate) instead of or in addition to at least one of the CPU performance and the I / O performance. Good.
- the expression that the server performance to be achieved reaches the upper limit may be rephrased as the expression that the system resource amount used reaches the upper limit (the system resource amount falls below the upper limit).
- the system resources include resources in the DB server 101, and may be resources of a computer system including the DB 110 and other devices (for example, the external storage device 118). As the system resource, for example, at least one of a CPU usage rate, an I / O throughput usage rate, and an I / O multiplicity usage rate may be employed.
- Example 2 will be described. At that time, differences from the first embodiment will be mainly described, and description of common points with the first embodiment will be omitted or simplified.
- DB operations that cannot execute tasks in parallel.
- sorting processing of a search result set can be cited.
- tasks can be executed in parallel, but the tasks cannot be executed in parallel throughout the sort process.
- the tail phase determination it is determined whether or not all DB operations that can execute multiple tasks have been completed, and the result of the determination is whether or not the running task is in the tail phase. Affects the conclusion of
- FIG. 9 illustrates an example of management of the execution state of the DBMS 104 according to the second embodiment.
- the query execution information that the execution information acquisition unit 112 acquires from the query execution unit (108) includes the number of contexts managed for each node of the query execution plan, and memory allocation information. Based on the number of contexts for each node in the query execution information, the execution information acquisition unit 112 determines whether each node (DB operation) is unexecuted (executed), executing (executing), or executed (executed). It is determined whether it is in a state. According to the example of the execution state shown in FIG. 9, since the number of contexts registered in the part context 904, the lineitem context 905, and the orders context 906 is 0, the Selection operation (Part), the Selection operation (Lineitem), and The operation (Orders) is determined to be Executed.
- the Grouping operation is also determined to be executed.
- the number of contexts registered in the Ordering context 908 is 1, Ordering Operation is determined to be Executing. If the number of contexts corresponding to the DB operation immediately before the DB operation is 1 or more, it is determined that the DB operation is not executed or is being executed.
- the query execution start control unit 111 acquires whether or not multiple tasks can be executed for each DB operation based on the query execution plan information included in the query execution information. And DB operations that cannot be executed multiple times are managed as “Single Exec”.
- FIG. 10 is a flowchart illustrating a flow of tail phase determination according to the second embodiment.
- S1001 is performed instead of S701 in FIG.
- the query execution start control unit 111 finishes all the DB operations that can be executed in a multiple manner based on the query execution information (in particular, the state of each node (DB operation) specified by the execution information acquisition unit 112). It is determined whether or not. If the determination result in S1001 is true (S1001: YES), S702 is performed, and if the determination result in S1001 is false (S1001: NO), S704 is performed.
- the performance will not be improved in executing the query being executed (in other words, the amount of resources consumed will not increase).
- the query being executed is in the tail phase. Determined.
- Example 3 will be described. At that time, differences from the first and second embodiments will be mainly described, and description of common points with the first and second embodiments will be omitted or simplified.
- FIG. 11 shows a configuration of a computer system according to the third embodiment.
- the application server 1102 is communicably connected to the DB server 101 via a communication network 1109.
- the DB server 101 is connected to the external storage device 118 via the communication network 403 so as to be communicable.
- a user terminal (client terminal) 1101 is communicably connected to the application server 1102 via a communication network arc 1108.
- the DB server 101 executes a DBMS 104 that manages the DB 122.
- the external storage device 118 stores the DB 122.
- the application server 1102 executes an application program that issues a query to the DBMS 104.
- the user terminal 1101 issues a request to an application program executed on the application server 1102.
- a plurality of user terminals 1101 or application servers 1102 may exist.
- Application server management terminal 1105 is communicably connected to application server 1102 via communication network 1111.
- the DB server management terminal 1106 is communicably connected to the DB server 101 via the communication network 1112.
- the external storage management terminal 1107 is communicably connected to the external storage apparatus 118 via the communication network 1113.
- the application server management terminal 1105 is a terminal that manages the application server 1102.
- the DB server management terminal 1106 is a terminal that manages the DB server 101.
- the external storage management terminal 1107 is a terminal that manages the external storage device 118. Note that at least two of the management terminals 1105 to 1107 may be common (integrated). Further, at least two of the communication networks 403 and 1108 to 1113 may be common (integrated).
- the user terminal 1101 issues a request (hereinafter referred to as a user request) to the application server 1102.
- the application server 1102 generates a query according to the user request received in S1114. Then, the generated query is issued to the DB server 101.
- the DB server 101 receives a query from the application server 1102, and executes the received query.
- the DB server 101 issues a data input / output request (for example, a data read request) necessary for execution of the accepted query to the external storage device 118.
- the DB server 101 may issue a plurality of data input / output requests in parallel in executing one query.
- the DB server 101 may make the request of S1116 in parallel several times in the execution of one query.
- the external storage apparatus 118 responds to the DB server 101 with respect to the data input / output request issued in S1116.
- the external storage apparatus 118 may perform the response of S1119 in parallel several times.
- the DB server 101 generates a query execution result and transmits it to the application server 1102.
- the application server 1102 receives the query execution result. Then, an answer to the user request received in S1114 according to the execution result is transmitted to the user terminal 1101.
- a computer that executes such a system executes, for example, an execution process request control unit that controls the start of execution of each of a plurality of process requests, and the process request that has been started. And a request execution unit that performs the processing. Whether the execution processing request control unit continuously exhibits a predetermined performance after a certain point in time based on the execution state of the computer (or computer system), which is the performance exhibited by the execution of the processing request being executed.
- a process request waiting to be executed may be started before execution of the process request being executed ends.
- the DB operation can be read as the operation, and the query can be read as the processing request.
- DBMS Database management system
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Operations Research (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
(S1114)ユーザ端末1101は、アプリケーションサーバ1102に要求(以下、ユーザ要求)を発行する。
(S1115)アプリケーションサーバ1102は、S1114で受信したユーザ要求に従いクエリを生成する。そして、生成したクエリをDBサーバ101に発行する。
(S1116)DBサーバ101は、アプリケーションサーバ1102からのクエリを受け付け、受け付けたクエリを実行する。DBサーバ101は、受け付けたクエリの実行において必要なデータ入出力要求(例えばデータ読出し要求)を外部ストレージ装置118に発行する。DBサーバ101は、1つのクエリの実行において、複数のデータ入出力要求を並行して発行することがある。そのため、DBサーバ101は、1つのクエリの実行において、S1116の要求を複数回並行して行うことがある。
(S1119)外部ストレージ装置118は、S1116で発行されたデータ入出力要求について、DBサーバ101に応答する。外部ストレージ装置118は、S1119の応答を複数回並行して行うことがある。
(S1118)DBサーバ101は、クエリの実行結果を生成し、アプリケーションサーバ1102に送信する。
(S1117)アプリケーションサーバ1102は、クエリの実行結果を受信する。そして、該実行結果に従う、S1114で受信したユーザ要求に対する回答を、ユーザ端末1101に送信する。
Claims (12)
- データベースへの複数のクエリの各々の実行開始を制御する実行クエリ制御部と、
実行開始とされたクエリを実行するクエリ実行部と
を有し、
前記実行クエリ制御部が、
データベース管理システムの実行状態に基づいて、実行中のクエリの実行により発揮される性能である発揮性能が或る時点以降継続して所定の条件を満たすか否かを判定し、
前記判定の結果の真の場合、前記実行中のクエリの実行終了前に実行待ちのクエリを実行開始とする、
データベース管理システム。 - 前記発揮性能が前記所定の条件を満たすとは、データベース管理システムを含んだ計算機の性能を含むシステム性能についての所定の閾値を前記発揮性能が下回ることである、
請求項1記載のデータベース管理システム。 - 前記データベース管理システム実行状態は、前記実行中のクエリの実行状態である実行クエリ状況を含み、
前記発揮性能が前記或る時点以降継続して前記所定の条件を満たすとは、前記データベース管理システムを含んだ計算機の性能を含むシステム性能についての所定の閾値を前記発揮性能が下回り、且つ、前記実行クエリ状況が、前記実行中のクエリがテールフェーズにあることを表すことである、
請求項1記載のデータベース管理システム。 - 前記複数のクエリの各々について、クエリを実行するために必要な複数のデータベースオペレーションと前記複数のデータベースオペレーションの実行手順とを表す情報を含んだクエリ実行プランを生成するクエリ実行プラン生成部、
を更に有し、
前記実行クエリ状況は、前記実行中のクエリのクエリ実行プランと、前記実行中のクエリの進捗とに基づいている、
請求項3記載のデータベース管理システム。 - 複数のデータベースオペレーションは、1以上の結合オペレーションを含み、
前記1以上の結合オペレーションの各々は、外表から取得されたレコードを用いて内表から取得されたレコードの結果を生成するデータベースオペレーションであり、
前記実行クエリ状況は、更に、メモリ領域の確保状況を含み、
前記クエリ実行部は、前記複数のクエリの各々の実行において、データベースオペレーションを実行するためのタスクを動的に生成し、動的に生成されたタスクを実行し、2以上の実行可能なタスクが存在する場合には、それら2以上のタスクのうちの少なくとも2つのタスクを並行して実行することで、データ読出し要求を多重化して発行し、且つ、多重化したデータ読出し要求の内容を含んだコンテキストを保持し、
前記実行中のクエリが前記テールフェーズにあるとは、最外表から推定結合率が1より大きい結合オペレーションの外表までのデータベースオペレーションに対応したコンテキストの総和が0であり、且つ、前記実行中のクエリの後段のデータベースオペレーションで必要なメモリ領域が確保済である、
各結合オペレーションについて、推定結合率は、結合元の件数に対する結合結果の件数の倍率の推定値である、
請求項3記載のデータベース管理システム。 - 前記実行中のクエリが前記テールフェーズにあるとは、2以上のタスクが並行実行されるデータベースオペレーションが全て実行済である、
請求項3記載のデータベース管理システム。 - 前記発揮性能が前記所定の条件を満たすとは、CPU性能が第1の条件を満たすこと、および、I/O性能が第2の条件を満たすこと、のうちの少なくとも1つである、
請求項1記載のデータベース管理システム。 - 前記CPU性能は、CPU使用率であり、
前記I/O性能は、I/OスループットとI/O多重度であり、
前記CPU性能が前記第1の条件を満たすとは、前記CPU使用率が所定の使用率を下回ることであり、
前記I/O性能が前記第2の条件を満たすとは、前記I/Oスループットが所定のスループットを下回り、且つ、前記I/O多重度が、所定の多重度を下回ることである、
請求項7記載のデータベース管理システム。 - 前記或る時点以降継続してとは、前記或る時点からクエリ実行終了までである、
請求項1記載のデータベース管理システム。 - 前記発揮性能が或る時点以降継続して所定の条件を満たすか否かの判定は、定期的に行われる、
請求項1記載のデータベース管理システム。 - データベース管理システムの実行状態を表す情報を記憶するメモリと、
データベースへの複数のクエリの各々の実行開始を制御し実行開始とされたクエリを実行するプロセッサと
を有し、
前記プロセッサが、
前記情報に基づいて、実行中のクエリの実行により発揮される性能である発揮性能が或る時点以降継続して所定の条件を満たすか否かを判定し、
前記判定の結果の真の場合、前記実行中のクエリの実行終了前に実行待ちのクエリを実行開始とする、
計算機。 - データベース管理システムの実行状態に基づいて、実行中のクエリの実行により発揮される性能である発揮性能が或る時点以降継続して所定の条件を満たすか否かを判定し、
前記判定の結果の真の場合、実行待ちのクエリがあれば、前記実行中のクエリの実行終了前に、前記実行待ちのクエリの実行を開始する、
データベース管理方法。
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2014/059274 WO2015145761A1 (ja) | 2014-03-28 | 2014-03-28 | データベース管理システム、計算機、データベース管理方法 |
US15/111,201 US20160335321A1 (en) | 2014-03-28 | 2014-03-28 | Database management system, computer, and database management method |
JP2016509853A JP6210501B2 (ja) | 2014-03-28 | 2014-03-28 | データベース管理システム、計算機、データベース管理方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2014/059274 WO2015145761A1 (ja) | 2014-03-28 | 2014-03-28 | データベース管理システム、計算機、データベース管理方法 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2015145761A1 true WO2015145761A1 (ja) | 2015-10-01 |
Family
ID=54194347
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/JP2014/059274 WO2015145761A1 (ja) | 2014-03-28 | 2014-03-28 | データベース管理システム、計算機、データベース管理方法 |
Country Status (3)
Country | Link |
---|---|
US (1) | US20160335321A1 (ja) |
JP (1) | JP6210501B2 (ja) |
WO (1) | WO2015145761A1 (ja) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112100208A (zh) * | 2020-09-08 | 2020-12-18 | 北京金山云网络技术有限公司 | 一种操作请求的转发方法和装置 |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6690829B2 (ja) * | 2015-08-28 | 2020-04-28 | 国立大学法人 東京大学 | 計算機システム、省電力化方法及び計算機 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07253951A (ja) * | 1994-03-15 | 1995-10-03 | Toshiba Corp | 分散処理システム |
JP2007034414A (ja) * | 2005-07-22 | 2007-02-08 | Masaru Kiregawa | データベース管理システム及び方法 |
JP2008276739A (ja) * | 2007-04-05 | 2008-11-13 | Kyocera Mita Corp | 情報処理システム及び情報処理プログラム |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6108653A (en) * | 1998-08-31 | 2000-08-22 | Platinum Technology Ip, Inc. | Method and apparatus for fast and comprehensive DBMS analysis |
US7627618B2 (en) * | 2007-02-21 | 2009-12-01 | At&T Knowledge Ventures, L.P. | System for managing data collection processes |
US7774336B2 (en) * | 2007-09-10 | 2010-08-10 | International Business Machines Corporation | Adaptively reordering joins during query execution |
US7885969B2 (en) * | 2007-09-17 | 2011-02-08 | International Business Machines Corporation | System and method for executing compute-intensive database user-defined programs on an attached high-performance parallel computer |
JP4815459B2 (ja) * | 2008-03-06 | 2011-11-16 | 株式会社日立製作所 | 負荷分散制御サーバ、負荷分散制御方法及びコンピュータプログラム |
US10261888B2 (en) * | 2012-10-12 | 2019-04-16 | Teradata Us, Inc. | Emulating an environment of a target database system |
CN102946486A (zh) * | 2012-11-20 | 2013-02-27 | 惠州Tcl移动通信有限公司 | 一种基于手机的后台应用自动清理方法及手机 |
US9171043B2 (en) * | 2013-01-31 | 2015-10-27 | International Business Machines Corporation | Dynamically determining join order |
-
2014
- 2014-03-28 JP JP2016509853A patent/JP6210501B2/ja active Active
- 2014-03-28 US US15/111,201 patent/US20160335321A1/en not_active Abandoned
- 2014-03-28 WO PCT/JP2014/059274 patent/WO2015145761A1/ja active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07253951A (ja) * | 1994-03-15 | 1995-10-03 | Toshiba Corp | 分散処理システム |
JP2007034414A (ja) * | 2005-07-22 | 2007-02-08 | Masaru Kiregawa | データベース管理システム及び方法 |
JP2008276739A (ja) * | 2007-04-05 | 2008-11-13 | Kyocera Mita Corp | 情報処理システム及び情報処理プログラム |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112100208A (zh) * | 2020-09-08 | 2020-12-18 | 北京金山云网络技术有限公司 | 一种操作请求的转发方法和装置 |
Also Published As
Publication number | Publication date |
---|---|
US20160335321A1 (en) | 2016-11-17 |
JP6210501B2 (ja) | 2017-10-11 |
JPWO2015145761A1 (ja) | 2017-04-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11132380B2 (en) | Resource management systems and methods | |
US11983198B2 (en) | Multi-cluster warehouse | |
US9842136B2 (en) | Database management system, computer, and database management method | |
JP5999574B2 (ja) | データベース管理システム及び計算機システム | |
US9639576B2 (en) | Database management system, computer, and database management method | |
US11036608B2 (en) | Identifying differences in resource usage across different versions of a software application | |
US9841989B2 (en) | Parallel data processing system, computer, and parallel data processing method | |
US9477418B2 (en) | Assigning device adaptors to use to copy source extents to target extents in a copy relationship | |
US10810174B2 (en) | Database management system, database server, and database management method | |
WO2015111152A1 (ja) | データベース管理システム及び方法 | |
JP6168635B2 (ja) | データベース管理システム、計算機、データベース管理方法 | |
JP6707797B2 (ja) | データベース管理システム及びデータベース管理方法 | |
CN110781159B (zh) | Ceph目录文件信息读取方法、装置、服务器及存储介质 | |
JP6823626B2 (ja) | データベース管理システム及び方法 | |
US10838949B2 (en) | Shared resource update apparatus and shared resource update method | |
JP6210501B2 (ja) | データベース管理システム、計算機、データベース管理方法 | |
US9870152B2 (en) | Management system and management method for managing data units constituting schemas of a database | |
US10824640B1 (en) | Framework for scheduling concurrent replication cycles | |
JP6764175B2 (ja) | データベース管理システム、及び、データベース管理方法 | |
Wadhwa | Scalable Data Management for Object-based Storage Systems | |
양영석 | A Flexible Architecture for Optimizing Distributed Data Processing | |
JP2014063336A (ja) | 計算機システム及びジョブネット実行方法 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 14886766 Country of ref document: EP Kind code of ref document: A1 |
|
ENP | Entry into the national phase |
Ref document number: 2016509853 Country of ref document: JP Kind code of ref document: A |
|
WWE | Wipo information: entry into national phase |
Ref document number: 15111201 Country of ref document: US |
|
NENP | Non-entry into the national phase | ||
122 | Ep: pct application non-entry in european phase |
Ref document number: 14886766 Country of ref document: EP Kind code of ref document: A1 |