Scheduling query execution plans in relational databases

By using metadata to identify and manage common partitions, the method optimizes query execution plans in relational databases, reducing computational costs and resource locking, enabling parallel execution of queries without data overlap.

JP7790841B2Active Publication Date: 2025-12-23INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2023534179
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-12-08
Filing Date
2021-12-07
Publication Date
2025-12-23
Estimated Expiration
2041-12-07

AI Technical Summary

Technical Problem

Existing relational database systems face inefficiencies in scheduling query execution plans due to overlapping access to shared data sets, leading to increased computational costs and resource locking, especially when queries are executed in parallel.

Method used

A method for determining and scheduling query execution plans based on metadata analysis to identify and manage common partitions, allowing for parallel execution without data set overlap, thereby reducing the need for locking mechanisms and optimizing computational resources.

Benefits of technology

This approach enhances the efficiency of query execution by minimizing computational costs and resource locking, ensuring data isolation and speeding up the execution of multiple queries by executing them in parallel when no common partitions exist.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007790841000001
    Figure 0007790841000001
  • Figure 0007790841000002
    Figure 0007790841000002
  • Figure 0007790841000003
    Figure 0007790841000003
Patent Text Reader

Abstract

A method, computer program product, and system for scheduling a first query execution plan for executing a first query to access a first data set of data in a relational database system (RDBS) and a second query execution plan for executing a second query to access a second data set of data, the data being partitioned into data blocks of the data set, and metadata of the RDBS including individual information about at least one property of the data set of individual data blocks of the data blocks, the scheduling can be performed based on an examination of whether there is a common partition between a first partition of the data blocks capable of satisfying a first condition according to the first query and a second partition of the data blocks capable of satisfying a second condition according to the second query.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates to the field of database technology, and more particularly to a method for scheduling queries to access datasets of data in a relational database system. [Background technology]

[0002] A relational database system includes data tables linked together. Queries are used to search and update data sets based on criteria formulated in the form of expressions and predicates. Queries can be optimized with respect to the predicates by the relational database system's query optimizer. For example, the computational cost of executing various variations of a query in the database system can be estimated depending on the predicates, and the query can be optimized in terms of reducing the computational cost. The optimized query can then be converted into a query execution plan. The query execution plan can be scheduled using the relational database system's workload manager. Summary of the Invention

[0003] Various embodiments provide computer systems and methods as described by the subject matter of the independent claims. Advantageous embodiments are described in the dependent claims. The embodiments of the present disclosure may be freely combined with one another if they are not mutually exclusive.

[0004] In one aspect, the present disclosure relates to a method for scheduling a set of query execution plans, the set of query execution plans including at least a first query execution plan for executing a first query to access a first data set of data of a relational database system, RDBS, and a second query execution plan for executing a second query to access a second data set of data, the data being divided into data blocks of the data set of data, and metadata of the RDBS including respective information about at least one property of the data set of each of the data blocks. The method includes: determining a first partition of data blocks that may be accessed when the first query execution plan is executed in the RDBS based on the metadata and a condition that the first data set must satisfy according to the first query; determining a second partition of data blocks that may be accessed when the second query execution plan is executed in the RDBS based on the metadata and a condition that the second data set must satisfy according to the second query; Checking whether there is a common partition between the data blocks of the first partition and the second partition; scheduling a first query execution plan and a second query execution plan in the RDBS based on the results of the examination; Includes.

[0005] In another aspect, the present disclosure relates to a computer program product including a computer readable storage medium having computer readable program code embodied thereon configured to implement the method according to the aforementioned embodiments.

[0006] In another aspect, the present disclosure relates to a computer system for scheduling a set of query execution plans, the set of query execution plans including at least a first query execution plan for executing a first query to access a first data set of data of a relational database system, RDBS, and a second query execution plan for executing a second query to access a second data set of data, the data being divided into data blocks of the data set of data, and the metadata of the RDBS including respective information about at least one property of the data set for each of the data blocks. determining a first partition of data blocks that may be accessed when the first query execution plan is executed in the RDBS based on the metadata and a condition that the first data set must satisfy according to the first query; determining a second partition of data blocks that may be accessed when the second query execution plan is executed in the RDBS based on the metadata and a condition that the second data set must satisfy according to the second query; Checking whether there is a common partition between the data blocks of the first partition and the second partition; scheduling a first query execution plan and a second query execution plan in the RDBS based on the results of the examination; can be configured for

[0007] The following embodiments of the present disclosure will now be described in greater detail, by way of example only, with reference to the following drawings: [Brief explanation of the drawings]

[0008] [Figure 1] 1 illustrates a computer system in accordance with the present subject matter. [Figure 2]FIG. 2 is a diagram illustrating a network connected to the computer system of FIG. 1. [Figure 3] A diagram illustrating a relational database system. [Figure 4] 4 illustrates a data table of the relational database system of FIG. 3 showing the configuration of a first partition of data blocks and the configuration of a second partition of data blocks according to a first use case. [Figure 5] FIG. 5 is a diagram showing a table illustrating metadata for data blocks in the data table of FIG. [Figure 6] FIG. 10 is a diagram illustrating a schedule for scheduling a first query execution plan and a second query execution plan in an RDBS. [Figure 7] FIG. 10 is a diagram showing the configuration of a first partition of data blocks and the configuration of a second partition of data blocks according to a second use case. [Figure 8] FIG. 10 illustrates a further schedule for scheduling a first query execution plan and a second query execution plan in an RDBS. [Figure 9] FIG. 10 is a diagram illustrating a schedule for scheduling a first query execution plan and a second query execution plan in an RDBS according to a further modification. [Figure 10] FIG. 8 shows a table illustrating further metadata for the data blocks of the data table of FIG. 7. [Figure 11] FIG. 10 is a diagram showing the configuration of a first partition of data blocks and the configuration of a second partition of data blocks according to a further variant of the first use case. [Figure 12] FIG. 10 is a diagram showing the configuration of a first partition of data blocks and the configuration of a second partition of data blocks according to a further variant of the second use case. [Figure 13]1 is a flowchart of a computer-implemented method for scheduling a first query execution plan and a second query execution plan in an RDBS. DETAILED DESCRIPTION OF THE INVENTION

[0009] The present disclosure relates to the field of database technology, and more particularly to a method for scheduling queries to access a data set of data in a relational database system. The description of various embodiments of the present disclosure is presented for illustrative purposes, but is not intended to be exhaustive or limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein has been chosen to best explain the principles, practical applications, or technical improvements over commercially available technologies of the embodiments, or to enable others skilled in the art to understand the embodiments disclosed herein.

[0010] As used herein, the term relational database system (RDBS) is also known as a relational database management system (RDBMS). In addition, the terms first query execution plan and second query execution plan may hereinafter also be referred to as the first plan and the second plan, respectively. Furthermore, a common partition between data blocks of the first partition and the second partition may hereinafter also be referred to as a common partition. A check for the existence of a common partition may hereinafter also be referred to as a check.

[0011] The condition that a first data set must satisfy according to a first query is hereinafter referred to as the first condition. Similarly, the condition that a second data set must satisfy according to a second query is hereinafter referred to as the second condition. The first plan includes commands for accessing, i.e., reading, the first data set, and / or commands for modifying the first data set. Similarly, the second plan includes commands for accessing, i.e., reading, the second data set, and / or commands for modifying the second data set. The first and second plans can be generated using the RDBS's query compiler based on the first and second queries, respectively. The first and second queries each include a first statement that includes the first condition and a second statement that includes the second condition.

[0012] Scheduling the first and second plans based on the results of the inspection has the following advantages. First, if there is no common partition, only a single data set can be accessed by either executing the first plan or the second plan in the RDBS. In other words, one data set cannot be accessed at a first time by executing the first plan, and then accessed at a second time by executing the second plan, or vice versa. Therefore, stating that there is no common partition can be equivalent to stating that there is no data set that can be accessed when executing the first plan and that can also be accessed when executing the second plan. This means that the executions of the first and second plans are separated from each other in terms of data sets if there is no common partition.

[0013] For example, a first plan cannot update one of the data datasets that can be read by executing a second plan, and vice versa. For this reason, performing a check for the existence of a common partition can ensure the isolation of the first plan from the second plan when considering data datasets where there is no common partition. This can reduce the computational cost of the RDBS when executing the first and second plans in parallel.

[0014] For example, a locking mechanism in an RDBS that locks at least a portion of a first partition of data blocks or a second partition of data blocks, or both, so that these data blocks can only be accessed by the execution of a single query execution plan at a given moment, may cause the first plan and the second plan to execute differently in the RDBS if there is no common partition. For example, the locking mechanism may not lock the first partition of data blocks or the second partition of data blocks, or both, when the first plan and the second plan execute in parallel if there is no common partition.

[0015] However, the locking mechanism may lock the first and / or second partitions of a data block when the first and second plans run in parallel if a common partition exists. Therefore, if there is no common partition, the computational load required to lock the first and / or second partitions of a data block can be reduced. This can be advantageous when the first and second plans access the same data table in an RDBS.

[0016] Typically, a locking mechanism is activated when the first plan and the second plan access the same data table. However, the embodiment of the present disclosure can overcome this drawback by deactivating the locking mechanism when the first plan and the second plan access the same data table if there is no common partition. When the common partition is not accessed, access isolation is guaranteed.

[0017] In some embodiments, determining the data blocks accessed by the first partition and the second partition is performed based on metadata. Additionally, scheduling may be performed based on the results of the check. Information from the check about the data can also be used for scheduling. This information can be used to reduce restrictions on the execution of the first and / or second plan. Reducing the restrictions can deactivate locks on the first and / or second partition. Reducing the restrictions can generally reduce computational resources and time.

[0018] Furthermore, if the plans do not share a common partition, then the first and second plans do not need to be scheduled so that they do not overlap in terms of their execution times. Typically, this is done to prevent locking mechanisms from being activated if the first and second plans access the same data table, for example. Therefore, constraints on scheduling when there are no common partitions can be reduced or discarded. In this case, optimizing the scheduling of a set of query execution plans can be simplified to a few constraints, and these constraints can be thought of as boundary conditions for optimizing the scheduling of the plans.

[0019] Also, if a common partition exists, the results of the first plan may be used in the second plan, and vice versa, thereby reducing the number of data sets accessed during the execution of the first and second plans, potentially reducing computational costs.

[0020] In some embodiments, the metadata determines whether the first partition includes a discarded first complementary partition of data blocks using a first condition that the first data set must satisfy according to the first query. The first complementary partition of data blocks can represent data blocks of data that are not accessed when the first query execution plan is executed in the RDBS. Furthermore, in some embodiments, the metadata and a second condition that the second data set must satisfy according to the second query are used to determine whether the second partition includes a discarded second complementary partition of data blocks. The second complementary partition of data blocks can represent data blocks of data that are not accessed when the second query execution plan is executed in the RDBS. The first complementary partition can be considered a complement to the first partition, and vice versa. This means that the first partition and the first complementary partition are disjoint and can be used together to construct data. Similarly, the second complementary partition can be thought of as the complement of the second partition, and vice versa. This means that the second partition and the second complementary partition are disjoint and can be used together to construct data.

[0021] Determining whether to discard the first complementary partition is advantageous because it avoids the need to find all data blocks that will not be accessed when the first plan is executed in order to create the first complementary partition. Conversely, if the first complementary partition cannot be determined by discarding the first complementary partition, and the results of the check suggest that there is no common partition, it is necessary to find all possible data blocks that may be accessed when the first plan is executed in order to safely state that this is the case. To achieve this, the metadata of every individual data block of data must be checked against the first condition. Completing this type of routine can be time-consuming, especially if the data blocks are very small and numerous.

[0022] However, the generation of the first complementary partition can be interrupted at any time and does not need to be completed. In this case, if a first partition is determined to be complementary to the first complementary partition, the result of the check can be considered certain if there is no common partition. Consequently, this embodiment can speed up the generation of the first partition. Similarly, determining the second partition by discarding the second complementary partition can provide the same benefits from the same reasoning applied to the second partition, second condition, and second complementary partition. Metadata can be thought of as much more compact information about the data compared to, for example, an index that indexes each data set of the data. Such compact information may be less suitable for checking if one of the data sets of the data may satisfy either the first condition or the second condition. However, this compact information in the form of metadata can be very useful to discard data blocks of a data set, which may not be accessed to test the first or second condition on these data sets. This effect may be used for scheduling.

[0023] In some embodiments, the method also includes scheduling the first query execution plan and the second query execution plan such that, if there is a common partition between data blocks of the first and second partitions, results of the first query execution plan are available in the cache memory of the RDBS for use by the second query execution plan. For example, the first plan and the second plan may be scheduled such that at least a portion of the results of the first plan are stored in the cache memory when the second plan is executed by the RDBS, or vice versa, if a common partition exists. This embodiment can ensure that at least a portion of the results of the first plan are available for execution of the second plan, or vice versa, if a common partition exists. The scheduling may be performed as a function of the actual space available in the cache memory and the estimated required size of the cache for storing results or portions of results of the first plan or the second plan.

[0024] In some embodiments, the method also includes activating a locking mechanism of the RDBS to lock data blocks of a common partition, thereby ensuring that these data blocks can only be accessed by execution of a single query execution plan at a given time. The locking mechanism can be activated if a common partition exists. The single execution plan can be either the first plan or the second plan. This variation ensures data isolation, and execution times of the first and second plans are preserved. As used herein, the term "data isolation" means that concurrent execution of a set of query execution plans leaves the data in the same state as would be obtained if these plans were executed in order.

[0025] In some embodiments, the method also includes scheduling the first query execution plan and the second query execution plan such that, if there is no common partition between the data blocks of the first partition and the second partition, the first query execution plan and the second query execution plan are executed in parallel in the RDBS. Parallel execution of the first and second plans can speed up the execution of the set of query execution plans. In cases where there is no common partition, the first and second plans may be executed in parallel, and the computational load required to lock the first partition, the second partition, or both of the data blocks may be very low or even zero. Therefore, the resulting speedup of the execution of the set of query execution plans may not be compromised by the locking mechanism. If there is no common partition, i.e., if the size of the common partition is zero, the first and second plans are executed in parallel without risk of losing data isolation. In most cases, the locking mechanism is not activated for the first and / or second partitions if there is no common partition.

[0026] In some embodiments, the method includes deactivating a locking mechanism of the RDBS for locking at least a portion of a first partition of data blocks and a second partition of data blocks. The locking mechanism ensures that these data blocks are accessed only by the execution of a single query execution plan at a given moment. According to embodiments, the locking mechanism may be deactivated if there is no common partition. The deactivation of the locking mechanism may be implemented if the first plan and the second plan execute in parallel. Depending on the locking mechanism, the locking mechanism may allocate computational resources during execution of the first and second plans even if there is no common partition. For example, the locking mechanism may include a function for checking whether a common partition exists. In this case, deactivating the locking mechanism may reduce computational costs if there is no common partition.

[0027] In some embodiments, the information about the properties of the data sets of the individual data blocks is a range within which the data values ​​of the data sets of the individual data blocks lie. The range can be defined by a minimum data value in the individual data blocks and a maximum data value in the individual data blocks. Using ranges as the individual information about the properties of the data sets of the individual data blocks, i.e., using ranges as metadata, has the advantage that significant information about these data sets can be provided using only two values, the minimum and maximum data values, thereby reducing the execution time of the first or second plan. For example, based on the ranges, one or more individual data blocks can be discarded if the data sets of these blocks do not meet the first or second criteria. The ranges within which the data values ​​of the data sets of the individual data blocks lie can represent one of the most compact information about these data sets and can also help reduce the execution time of the first and second plans.

[0028] In some embodiments, data in an RDBS is stored using data tables. A range is defined by the minimum data value in a data table column within that individual data block and the maximum data value in that data table column within that individual data block. Each data block can represent an individual block of rows in the data table. When a range refers to data values ​​in a table column, determining the first and second partitions, particularly discarding the first and second complementary partitions, can be performed at a more granular level. This can result in amplifying the first and / or second complementary partitions and reducing the size of the first and / or second partitions. This can reduce the computational cost of executing the first and / or second plans.

[0029] In some embodiments, the property of the data set can be the distribution of data values ​​within each data block. The individual information about the properties of the data set of each data block can describe the distribution of the data values. The distribution of data values ​​within each data block may include further information about the data set of each block, particularly enabling the determination of first and second partitions while performing discarding of the first and second complementary partitions. By similar reasoning as above, this can reduce the computational cost of executing the first and / or second schemes. The information describing the distribution includes several intervals that divide the range into equal-length portions. The information describing the distribution may further include a respective number of data sets corresponding to each interval, the respective number of data sets indicating the number of data sets of each data block that contain data values ​​present in the respective interval. Alternatively, or in addition, the information describing the distribution includes a type of distribution of the data values ​​of the data set.

[0030] In some embodiments, data in an RDBS is stored using data tables with distributions that reference the distribution of data values ​​in columns of the data table within individual data blocks. Individual information about the properties of the data set in each data block describes the distribution of data values ​​in columns of the data table within the individual data blocks. Individual data blocks can represent individual blocks of rows in the data table. This allows for increased levels of refinement during execution of the first and / or second plan. Similarly, increased refinement can reduce the computational cost of executing the first and / or second plan.

[0031] In some embodiments, the distribution is represented by a density vector, which can represent a compact form of the number of data points corresponding to each interval.

[0032] In some embodiments, one of the two query execution plans, i.e., the first or second query execution plan, can be executed at a certain actual moment, and the other of the two query execution plans can be scheduled to start at a certain future moment. This describes the use of the proposed method when one of the query execution plans, i.e., the first or second plan, is currently running in the RDBS, and the other is not currently running but is scheduled to run in the future. Therefore, the embodiments of the present disclosure are not limited to applications where the first and second plans are executed in the future, considering the actual moment as the moment when scheduling is performed.

[0033] In some embodiments, the first and second query execution plans are scheduled to execute immediately after each other. This may increase the probability that the results of the first plan will be available in the RDBS cache memory for use by the second plan, or vice versa. This embodiment is advantageous when there is a common partition.

[0034] In some embodiments, the method includes receiving metadata from a query optimizer of the RDBS. The query optimizer can use the metadata for its own purposes, i.e., to optimize the first and / or second plans. For this reason, the query optimizer has already loaded metadata referencing individual data blocks from a metadata database into the query optimizer's cache memory. The workload manager of the RDBS can perform scheduling by reading the metadata from the query optimizer's cache memory, which may be faster than reading the metadata again from the metadata database.

[0035] In some embodiments, the method includes receiving information specifying the first partition and the second partition from a query optimizer of the RDBS. The query optimizer can match first and second statements of the first query and the second query, respectively, with the metadata. In this manner, the query optimizer can retrieve the information specifying the first partition and the second partition. In other words, this describes efficient use of information already calculated by the query optimizer.

[0036] In some embodiments, the method includes setting a boundary condition for executing the RDBS's query optimizer so that there is no common partition. If the query optimizer generates the first and second plans such that there is no common partition, the benefits described above can be realized. This may result in inefficiencies when the first and / or second plans are considered as a single query execution plan. However, when the common partition is empty, the reduced computational load can overcome such inefficiencies.

[0037] Embodiments of the present disclosure may be implemented using a computing device, which may also be referred to as a computer system, client, or server. Referring now to FIG. 1, a schematic of an example computer system 10 is shown. Computer system 10 may be merely one example of a suitable computer system and may not be intended to suggest any limitation as to the scope of use or functionality of the embodiments of the present disclosure described herein. Regardless, computer system 10 may implement and / or perform any of the functionality sets described herein above.

[0038] Computer system 10 includes computer system / server 12 operable in many other general-purpose or special-purpose computing system environments or configurations. Examples of well-known computing systems, environments, or configurations, or combinations thereof, that may be suitable for use with computer system / server 12 include, but are not limited to, relational database system 300 shown in FIG. 3, RDBS 300 stack 303, RDBS 300 query compiler 302, personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputer systems, mainframe computer systems, and distributed computing environments that include any of the above systems or devices.

[0039] In one example, computer system / server 12 may be designed in the form of a workload manager 301 of RDBS 300 shown in Figure 3. RDBS 300 includes a query compiler 302 for compiling queries, such as first query 311 and second query 312, into query execution plans, such as first query execution plan 321, also referred to hereinafter as first plan 321, and second query execution plan 322, also referred to hereinafter as second plan 322.

[0040] The computer system / server 12 may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform particular tasks or implement particular abstract data types. The computer system / server 12 may be practiced in a distributed computing environment where tasks are performed by remote processing devices linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer system storage media, including memory storage devices. An example of a remote processing device may be the query compiler 302, which may perform tasks for the workload manager 301.

[0041] As shown in FIG. 1, computer system / server 12 in computer system 10 is depicted as a general-purpose computing device. Components of computer system / server 12 may include, but are not limited to, one or more processors or processing units 16, system memory 28, and a bus 18 that couples various system components, including system memory 28, to processor 16. Bus 18 may represent any one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example and not limitation, such architectures include an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an Enhanced ISA (EISA) bus, a Video Electronics Standards Association (VESA) local bus, a Peripheral Component Interconnect (PCI) bus, and a Peripheral Component Interconnect Express (PCIe) bus.

[0042] Computer system / server 12 typically includes a variety of computer system-readable media, which can be any available media that can be accessed by computer system / server 12 and includes both volatile and nonvolatile media, removable and non-removable media.

[0043] System memory 28 may include computer-system-readable media in the form of volatile memory, such as random access memory (RAM) 30, a solid-state drive (SSD), and / or cache memory 32. Computer system / server 12 may further include other removable / non-removable, volatile / non-volatile computer-system storage media. By way of example only, a storage system 34 may be provided for reading from and writing to non-removable, non-volatile magnetic media (typically referred to as a "hard drive" and not shown). Although not shown, a magnetic disk drive may be provided for reading from and writing to removable, non-volatile magnetic disks (e.g., "floppy disks"), and an optical disk drive may be provided for reading from or writing to removable, non-volatile optical disks, such as CD-ROMs, DVD-ROMs, or other optical media. In such cases, each may be connected to bus 18 by one or more data media interfaces. As further depicted and described below, memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform functions of embodiments of the present disclosure.

[0044] A program / utility 40 having a set (at least one) of program modules 50 may be stored in memory 28, by way of example and not limitation, as well as an operating system, one or more application programs, other program modules, and program data. Each of the operating system, one or more application programs, other program modules, and program data, or some combination thereof, may include an implementation of a networking environment. The program modules 50 may generally be configured to perform the functions and / or methods of embodiments of the present disclosure as described herein.

[0045] As used herein, the terms "program" or "program module" refer to a set of instructions containing commands that cause actions to be performed by processor 16 when processor 16 can read the commands. The set of instructions may be in the form of a computer-readable program, routine, subroutine, or part of a library that can be executed by processor 16 and / or called by further programs being executed by processor 16. Preferably, program module 50 may be an executable program that is compiled depending on the type of hardware platform of computer system / server 12.

[0046] Computer system / server 12 may also communicate with one or more external devices 14, such as a keyboard, pointing device, display 24, one or more devices that allow a user to interact with computer system / server 12, or any device (e.g., network card, modem, etc.) that allows computer system / server 12 to communicate with one or more other computing devices, or a combination thereof. Such communication may occur via input / output (I / O) interface 22. Furthermore, computer system / server 12 may communicate with one or more networks, such as a local area network (LAN), a general wide area network (WAN), or a public network (e.g., the Internet), or a combination thereof, via network adapter 20. As depicted, network adapter 20 may communicate with other components of computer system / server 12 via bus 18. It should be understood that, although not shown, other hardware and / or software components may be used in conjunction with computer system / server 12. Examples include, but are not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archive storage systems.

[0047] A computer system, such as computer system 10 shown in Figure 1, can be used to perform the operations disclosed herein, such as the first, second, third, fourth, fifth, and sixth operations. For example, processor 16 can perform the first, second, third, fourth, fifth, and sixth operations.

[0048] The computer system 10 may be configured to schedule a set of query execution plans 331 of Figure 3. The set of query execution plans 331 includes at least a first query execution plan 321 for executing a first query 311 for accessing a first data set 411 of data 400 of the RDBS 300 of Figure 4. Further, the set 331 includes a second query execution plan 322 for executing a second query 312 for accessing a second data set 412 of the data 400. The data 400 may be divided into data blocks 410 of the data set of the data 400. The metadata 304 of the RDBS 300 includes individual information about at least one property of the data set of each data block 410. The data blocks 410 may include, for example, a first data block 410-1, a second data block 410-2, a third data block 410-3, a fourth data block 410-4, a fifth data block 410-5, and a sixth data block 410-6. The data sets of the data blocks 410 are represented by rectangles in FIG.

[0049] The first operation includes determining a first partition 401 of data blocks 410 that may be accessed when the first query execution plan 321 is executed in the RDBS 300 based on the metadata 304 and a condition that the first data set 411 must satisfy according to the first query 311, hereinafter referred to as the first condition.

[0050] The second operation includes determining a second partition 402 of data blocks 410 that may be accessed when the second query execution plan 322 is executed in the RDBS 300 based on the metadata 304 and a condition that the second data set 412 must satisfy according to the second query 312, hereinafter referred to as the second condition.

[0051] The third operation includes checking whether there is a common partition between the data blocks of the first partition 401 and the second partition 402 .

[0052] This fourth operation includes scheduling a first query execution plan 321 and a second query execution plan 322 in the RDBS 300 based on the results of the check.

[0053] The fifth operation includes determining the first partition 401 by discarding the first complementary partition 701 of the data block 410 based on the metadata 304 and the first condition.

[0054] A sixth operation includes determining the second partition 402 by discarding the second complementary partition 702 of the data block 410 based on the metadata 304 and a second condition.

[0055] The processor 16 can perform the first, second, third, fourth, fifth, and sixth operations by executing the first program module 41, the second program module 42, the third program module 43, the fourth program module 44, the fifth program module 45, and the sixth program module 46, respectively. The first processor 102 can execute a main program 51. The main program 51 can initiate the execution of the program modules 41, 42, 43, 44, 45, and 46 on the processor 16.

[0056] The computer system 10 may be a stand-alone computer without a network connection that may receive data to be processed, such as the first plan 321 and the second plan 322, through a local interface. However, such operations may equally be performed using a computer system connected to a network, such as a communications network and / or a computing network.

[0057] FIG. 2 illustrates an exemplary computing environment in which a computer system, such as computer system 10, is connected to a network 200 using, for example, a network adapter 20. RDBS 300 includes network 200 and can also be thought of as a computer system, such as computer system 10. RDBS 300, and preferably its components, such as query compiler 302, include components similar to those of computer system 10, such as one or more processors or processing units, such as processor 16, system memory, such as system memory 28, and buses, such as bus 18, that couple various components. Network 200 may be a communications network, such as the Internet, a local area network (LAN), or a wireless network, such as a mobile communications network. Network 200 also includes computing networks, such as a cloud computing network. The computer system 10 can receive data to be processed, such as the first plan 321 and the second plan 322, from the network 200, and / or can provide calculation results, such as a schedule 600 including the execution order of at least the first plan 321 and the second plan 322, to another computing device connected to the computer system 10 via the network 200.

[0058] Computer system 10 may perform the operations described herein, such as the first, second, third, fourth, fifth, and sixth operations, in whole or in part, in response to requests received over network 200. In particular, computer system 10 may perform such operations in a distributed manner with one or more additional computer systems that may be connected to computer system 10 over network 200. To this end, computer system 10 or any further participating computer systems or combinations thereof may use network 200 to access additional computing resources, such as dedicated or shared memory.

[0059] According to the example shown in FIG. 4, data 400 can be stored in the form of a data table 420. Data table 420 includes rows and columns 430. Each row can represent a single data set, often referred to as a data record of data 400. Therefore, the row number can increase by one for each data set according to the vertical arrow 421 in FIG. 4. However, in the example of FIG. 4, table 420 may not have a row index. Each column 430 can specify a different characteristic. For example, for each row, first column 431 can specify each person's date of birth, second column 432 can specify each person's last name, third column 433 can specify each person's first name, and fourth column 434 can specify each person's credit account balance. Thus, according to this example, table 420 can represent a bank account database. Each data set includes a number of entries corresponding to the number of columns 430. Each entry in one of the data sets is shown as a square in Figure 4. The birth date of each person can be given as the month of birth followed by the date of birth for each person.

[0060] Below, an example will be presented in which the individual information about the properties of the data set of the individual data blocks 410 can be a range of the individual data blocks 410 indicating the range within which the data values ​​of the data set of the individual data blocks 410 lie. The individual range can be defined by a respective minimum data value in the individual data blocks 410-1 and a respective maximum data value in the individual data blocks 410-N.

[0061] Furthermore, the illustrated example may represent a variant in which the range of an individual data block 410-N is defined by the respective minimum data value of the first column 431 of the data table 420 within the individual data block 410-N and the respective maximum data value of the first column 431 of the data table 420 within the individual data block 410-N. The individual data block 410-N may represent an individual block of rows of the data table 420, i.e., by way of example, an individual block of data records of the data table 420.

[0062] The metadata 304 includes the range of the individual data blocks 410-N. The metadata 304 can be stored in table form and includes values ​​provided in table 500 shown in FIG. 5. According to the data table 420 including six data blocks, table 500 includes six rows. In each row of table 500, the earliest and latest dates of birth provided by the data sets of the individual data blocks 410-N can be stored. For simplicity, only the month and day of birth are considered. The metadata 304 provided by table 500 can represent an example in which a data set can be ordered with respect to the data value of the first column 431, i.e., the person's date of birth. However, this may not be the case in further applications. In general, the selection of data types, such as date of birth and name, shown above serves only to illustrate the method presented in a simple manner. Of course, for other possible applications, the data 400 may be directed to technical data values, such as coefficients of material properties or data identifying chemical elements, their behavior, or chemical reactions.

[0063] A first simple application of the presented method can be directed to a lottery involving the use of a random number generator. The random number generator can generate data values ​​to specify a first set of random birth dates. The first set includes a first birth date and a second birth date. A person whose birth date is equal to one of the random birth dates in the first set can win $100. To realize a winning on a credit account of a person given the first set of random birth dates, a first query 311 can be formulated in SQL language as follows:

[0064] Update data table 420

[0065] Set balance of credit account = balance of credit account + 100$

[0066] Where birth date = 'first birth date' OR 'second birth date'“

[0067] The first predicate “birth date = 'first birth date' OR 'second birth date'” may express a first condition that the first data set 411 must satisfy according to the first query 311 .

[0068] The lottery may involve generating a second set of random birth dates using a random number generator. The second set includes a third birth date and a fourth birth date. A person whose birth date is equal to one of the random birth dates in the second set may win $100. To realize a winning on the credit account of a person given the second set of random birth dates, a second query 312 may be formulated in SQL language as follows:

[0069] Update data table 420

[0070] Set balance of credit account = balance of credit account + 100$

[0071] Where birth date = 'third birth date' OR 'fourth birth date'“

[0072] The second predicate “birth date = 'third birth date' OR 'fourth birth date'” may express a second condition that the second data set 412 must satisfy according to the first query 311.

[0073] The query compiler can compile the first and second queries 311, 312 into a first plan 321 and a second plan 322, respectively. The first plan 321 includes a first executable program including values ​​for specifying the first and second random birth dates and instructions for updating a data set that satisfies a first condition, i.e., first data set 411. These instructions include, for example, a first load command that loads all data sets in the first partition 401 and a first compare command that initiates a comparison to test a first condition against the data sets of data blocks in the first partition 401.

[0074] Similarly, the second plan 322 includes a second executable program including values ​​for specifying the third and fourth random birth dates and instructions for updating the data set that satisfies the second condition, i.e., the second data set 412. These instructions include, for example, a second load command that loads all data sets of the second partition 402 and a second compare command that initiates a comparison to test the second condition against the data sets of the data blocks of the second partition 402.

[0075] In the first use case of the presented method, the first random date of birth is "02.02.", the second random date of birth is "01.07.", the third random date of birth is "02.10.", and the fourth random date of birth is "10.12."

[0076] Query compiler 302 can generate a first load command to load all data sets of first partition 401 using metadata 304, in this case table 500, in another case table 1000, the first and second random birth dates, and the first predicate. Query compiler 302 can infer, using the first and second random birth dates and metadata 304, that first data set 411 may only be stored in first data block 410-1 and third data block 410-3. Similarly, query compiler 302 can generate a second load command to load all data sets of second partition 402 using metadata 304, the third and fourth random birth dates, and the second predicate. The query compiler 302 can use the third and fourth random birth dates and the metadata 304 to infer that the second data set 412 may only be stored in the fifth data block 410-5 and the sixth data block 410-6. The first plan 321 and the second plan 322 can be transferred from the query compiler 302 to the stack 303.

[0077] According to the first use case, the first partition 401 of the data set that may be accessed when the first plan 321 is executed includes the first data block 410-1 and the third data block 410-3. Furthermore, considering the first use case, the second partition 402 of the data set that may be accessed when the second plan 322 is executed includes the fifth data block 410-5 and the sixth data block 410-6. Thus, the first use case can represent a case where the first partition 401 and the second partition 402 are disjoint. Figure 4 illustrates possible distributions of the first data set 411 and the second data set 412, as well as possible configurations of the first partition 401 and the second partition 402, for the first use case.

[0078] The workload manager 301 can receive information specifying the first partition 401 and the second partition 402 from the query optimizer 302. In this example, determining the first and second partitions 401, 402 can be performed by a remote device, here the query compiler 302, relative to the workload manager 301. The workload manager 301 can perform a check to see if there is a common partition between the data blocks of the first partition 401 and the second partition 402. Considering the first use case, the result of this check can be that there is no common partition. In this example, the workload manager 301 can schedule the first plan 321 and the second plan 322 to execute in parallel in the RDBS 300. To achieve this, the workload manager 301 can generate a schedule 600, as shown in FIG. 6, such that the first plan 321 and the second plan 322 are scheduled to execute in parallel. Schedule 600 can determine which computing units in a rack of computing units 340 of RDBS 300 can execute which execution plans in set of execution plans 331. Rack 340 may include, for example, first computing unit 341, second computing unit 342, third computing unit 343, fourth computing unit 344, and fifth computing unit 345. The schedule includes one queue for each computing unit in rack 340, i.e., first queue 601 for first computing unit 341, second queue 602 for second computing unit 342, and so on.

[0079] The first and second plans 321, 322 can be thought of as computational jobs for the compute units, and these plans are shown as boxes in FIG. 6 . Unlabeled boxes in FIG. 6 can represent additional computational jobs that may similarly be scheduled by the workload manager 301. In a first use case, the schedule 600 can determine that the first plan 321 is scheduled to be executed by the first compute unit 341, the second plan 322 is scheduled to be executed by the second compute unit 342, and both plans 321, 322 are scheduled at least partially in parallel. Thus, in the first use case, the schedule 600 is designed such that there is a temporal overlap between the first plan 321 and the second plan 322. In one example, the first plan 321 and the second plan 322 may be scheduled to start at the same time.

[0080] The left part of one of the individual queues shows the actual computational jobs being executed by the individual computational units assigned to that individual queue. The queues expand in chronological order from left to right showing the jobs being executed by the individual computational units, with the last respective jobs of each computational unit being shown to the right of each individual queue.

[0081] The computing units of rack 340 can access database server 306 of RDBS 300, which contains various data tables, including data table 420, for executing execution plans of set 331, which includes first plan 321 and second plan 322.

[0082] In one example, workload manager 301 may receive information from query optimizer 302 about whether first partition 401 and second partition 402 are disjoint. In this example, workload manager 301 may only perform the generation of schedule 600, and query compiler 302 may perform other steps of the presented method.

[0083] In a first use case, the workload manager 301 may deactivate the RDBS locking mechanism, which may be configured to lock at least a portion of the first partition of data blocks 401 or the second partition of data blocks 402, or both. Locking these data blocks ensures that these data blocks can only be accessed by the execution of a single query execution plan, e.g., the first plan 321 or the second plan 322, at a given moment.

[0084] In the second use case of the presented method, the first random date of birth is "02.02.", the second random date of birth is "01.07.", the third random date of birth is "10.07.", and the fourth random date of birth is "10.12."

[0085] According to the second use case, the first partition 401 of the data set that may be accessed when the first plan 321 is executed includes the first data block 410-1 and the third data block 410-3. Furthermore, considering the first use case, the second partition 402 of the data set that may be accessed when the second plan 322 is executed includes the third data block 410-3 and the sixth data block 410-6. Thus, the second use case can represent a case where the first partition 401 and the second partition 402 are not disjoint. Figure 7 illustrates possible distributions of the first data set 411 and the second data set 412, as well as possible configurations of the first partition 401 and the second partition 402, for the second use case.

[0086] Similar to the first use case, in the second use case, the workload manager 301 can perform a check to see if there is a common partition between the data blocks of the first partition 401 and the second partition 402. Considering the second use case, the result of this check can be that there is a common partition. The common partition includes the third data block 410-3. In this case, according to the first variant, the workload manager 301 can schedule the first plan 321 and the second plan 322 so that the results of the first plan 321 are available in the cache memory of the RDBS 300 for use by the second plan 322. One way to achieve this is for the workload manager 301 to generate the schedule 600 so that the second plan 322 is scheduled to the same queue as the first plan 321, for example, the first queue 601, according to the first example of the first variant. This allows the data set of data blocks of the first partition 401 to be stored in the cache of the first computing unit 341 when the first computing unit 341 executes the second plan 322 after the first computing unit 341 executes the first plan 321. Figure 8 shows a schedule 600 generated by the workload manager 301 according to a first example of the first variant of the second use case.

[0087] Similarly, if both plans 321, 322 are scheduled to the second queue 602, this may allow the data set of data blocks of the first partition 401 to be stored in the cache of the second computing unit 342 when the second computing unit 342 executes the first plan 321 and then the second computing unit 342 executes the second plan 322.

[0088] According to a second example of the first variant of the second use case, the workload manager 301 can schedule the first plan 321 and the second plan 322 such that the first plan 321 and the second plan 322 are scheduled to execute immediately after each other. One way to achieve this is for the workload manager 301 to generate the schedule 600 such that the second plan 322 is scheduled to immediately follow the first plan 321 and to the same queue as the first plan 321, e.g., the first queue 601. FIG. 9 illustrates the schedule 600 generated by the workload manager 301 according to the second example of the first variant of the second use case. Furthermore, FIG. 9 illustrates an example of the schedule 600 in which the first plan 321 is executing at a certain actual instant in time and the second plan 322 is scheduled to start at a future instant in time. However, by way of another example, the first plan 321 does not necessarily have to be executed at a given moment in time to represent the application of the second example of the first variant of the second use case.

[0089] Generally, considering all of the use cases, variations, and examples described above, the workload manager 301, in one example, can send the schedule 600 to a job manager at the rack 340. In another example, the workload manager 301 can use the schedule 600 to launch a computational job, such as the first plan 321 or the second plan 322, or both, at the rack 340. In one example, the rack 340 includes the workload manager 301. In this instance, the workload manager 301 can control and log the computational jobs at the rack 340.

[0090] Below, we describe a further variation in which the data set is not sorted by date of birth as described above. In this case, the metadata 304 for the first column may include values ​​provided in table 1000 shown in FIG. 10. According to data table 420 including six data blocks, table 1000 includes six rows. In each row of table 500, the earliest and latest dates of birth provided by the data set of individual data blocks 410-N may be stored.

[0091] In a further variation, and according to the first use case, i.e., the first random date of birth is "02.02," the second random date of birth is "01.07," the third random date of birth is "02.10," and the fourth random date of birth is "10.12," the first partition 401 of the data set that may be accessed when the first plan 321 is executed includes the first data block 410-1, the second data block 410-2, and the third data block 410-3. Furthermore, considering the further variation and the first use case, the second partition 402 of the data set that may be accessed when the second plan 322 is executed includes the fourth data block 410-4, the fifth data block 410-5, and the sixth data block 410-6. Therefore, considering further variations, the first use case can similarly represent a case where first partition 401 and second partition 402 are disjoint. Figure 11 illustrates possible distributions of first data set 411 and second data set 412, as well as possible configurations of first partition 401 and second partition 402, considering further variations and the first use case.

[0092] In a further variation, determining the first partition 401 includes discarding a first complementary partition 701 of the data block 410 based on the metadata 304 and the first condition. The first complementary partition 701 can represent a data block of the data block 410 that is not accessed when the first plan 321 is executed in the RDBS 300. Furthermore, determining the second partition 402 includes discarding a second complementary partition 702 of the data block 410 based on the metadata 304 and the second condition. The second complementary partition 702 can represent a data block of the data block 410 that is not accessed when the second plan 322 is executed in the RDBS 300.

[0093] The workload manager 301 or the query compiler 302 may use the metadata 304 provided by the table 1000, the first and second random birth dates, and the first predicate to perform discarding of the first complementary partition 701. Similarly, the workload manager 301 or the query compiler 302 may use the metadata 304 provided by the table 1000, the third and fourth random birth dates, and the second predicate to perform discarding of the second complementary partition 702. For example, if the first and second random birth dates are not present in the range of an individual data block 410-N provided by the table 1000, then this data block 410-N may be discarded to determine the first partition 401. According to the first use case, the first complementary partition 701 includes the fourth data block 410-4, the fifth data block 410-5, and the sixth data block 410-6. The first partition 401 can then be determined as a set of data blocks including the data block 410 without the first complementary partition 701. Similarly, the second complementary partition 702 can be determined, and the second partition 402 is based on the second complementary partition 702.

[0094] As in a further variation of the first use case, the first partition 401 and the second partition 402 are disjoint, i.e., there is no common partition between the first partition 401 and the second partition 402, and the workload manager 301 can perform scheduling in the same manner as in the variation of the first use case in which the data sets are ordered with respect to date of birth.

[0095] Considering a further variation and a second use case, i.e., a case where the first random date of birth is "02.02," the second random date of birth is "01.07," the third random date of birth is "10.07," and the fourth random date of birth is "10.12," the first partition 401 of the data set that may be accessed when the first plan 321 is executed includes the first data block 410-1, the second data block 410-2, and the third data block 410-3. Furthermore, considering a further variation and a second use case, the second partition 402 of the data set that may be accessed when the second plan 322 is executed includes all data blocks 410. Therefore, considering a further variation, the second use case can similarly express a case where the first partition 401 and the second partition 402 are disjoint. FIG. 12 illustrates a possible distribution of the first data set 411 and the second data set 412, as well as a possible configuration of the first partition 401 and the second partition 402, considering a further variation and a second use case.

[0096] As in a further variation of the second use case, the first partition 401 and the second partition 402 are not disjoint, i.e., there is a common partition between the first partition 401 and the second partition 402, and the workload manager 301 can perform scheduling in the same manner as in the variation of the second use case in which the data sets are ordered with respect to date of birth.

[0097] FIG. 13 shows a flowchart of a computer-implemented method for scheduling a set of query execution plans 331.

[0098] In step 1001, a first partition 401 of data blocks that may be accessed when a first query execution plan 321 is executed in the RDBS 300 may be determined based on the metadata 304 and a first condition.

[0099] In step 1002, a second partition 402 of data blocks that may be accessed when the second query execution plan 322 is executed in the RDBS 300 may be determined based on the metadata 304 and a second condition.

[0100] In step 1003, a check can be performed to see if there is a common partition between the data blocks of the first partition 401 and the second partition 402.

[0101] In step 1004, the first query execution plan 321 and the second query execution plan 322 may be scheduled in the RDBS 300 based on the results of the check.

[0102] The present disclosure may be a system, method, or computer program product, or a combination thereof, at any possible level of technical detail of integration. The computer program product may include a computer-readable storage medium having computer-readable program instructions for causing a processor to execute aspects of the present disclosure. The computer-readable storage medium may be a tangible device capable of holding and storing instructions for use by an instruction-execution device.

[0103] A computer-readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of computer-readable storage media includes: portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanically encoded devices such as punch cards or grooved structures having instructions recorded thereon, and any suitable combination of the foregoing. As used herein, computer-readable storage media should not be construed as ephemeral signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., light pulses passing through fiber optic cable), or electrical signals transmitted over electrical wires.

[0104] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to an individual computing / processing device or to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, or a wireless network, or a combination thereof. The network may include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, or edge servers, or a combination thereof. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium within the individual computing / processing device.

[0105] Computer-readable program instructions for carrying out the operations of the present disclosure may be either source code or object code written in any combination of one or more programming languages, including assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state configuration data, configuration data for integrated circuits, or object-oriented programming languages ​​such as Smalltalk®, C++, and procedural programming languages ​​such as the "C" programming language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be to an external computer (e.g., via the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA) can execute computer-readable program instructions to customize the electronic circuitry by utilizing state information of the computer-readable program instructions to perform aspects of the present disclosure.

[0106] Aspects of the present disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0107] These computer-readable program instructions may be provided to a processor of a computer or other programmable data processing apparatus to produce a machine, such that the instructions, which execute on the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams. These computer-readable program instructions may also be stored on a computer-readable storage medium, capable of directing a computer, programmable data processing apparatus, or other device, or combination thereof, to function in a particular manner, such that the computer-readable storage medium on which the instructions are stored comprises an article of manufacture containing instructions that implement aspects of the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams.

[0108] The computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to produce a computer-implemented process and cause the computer, other programmable apparatus, or other device to perform a series of operational steps, such that the instructions, which execute on the computer, other programmable apparatus, or other device, implement the functions / operations specified in one or more blocks of the flowcharts and / or block diagrams.

[0109] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of instructions, including one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions shown in the blocks may occur out of the order shown in the figures. For example, two blocks shown in succession may actually be performed as a single step, or may be executed simultaneously, substantially simultaneously, partially, or fully overlapping in time, or the blocks may sometimes be executed in reverse order, depending on the functionality involved. It should also be noted that each block in the block diagrams and / or flowchart diagrams, and combinations of blocks in the block diagrams and / or flowchart diagrams, may be implemented by a dedicated hardware-based system that performs the specified functions or operations or executes a combination of dedicated hardware and computer instructions.

[0110] Below, the present disclosure is again described by a list of clauses that highlight some possible, non-exclusive combinations of the features disclosed herein.

[0111] 1. A computer-implemented method for scheduling a set of query execution plans, the set of query execution plans including at least a first query execution plan for executing a first query to access a first data set of data in a relational database system, RDBS, and a second query execution plan for executing a second query to access a second data set of data, the data being divided into data blocks of the data set, and metadata of the RDBS including respective information about at least one property of the data set for each of the data blocks, the method comprising: determining a first partition of data blocks that may be accessed when the first query execution plan is executed in the RDBS based on the metadata and a condition that the first data set must satisfy according to the first query; determining a second partition of data blocks that may be accessed when the second query execution plan is executed in the RDBS based on the metadata and a condition that the second data set must satisfy according to the second query; Checking whether there is a common partition between the data blocks of the first partition and the second partition; scheduling a first query execution plan and a second query execution plan in the RDBS based on the results of the examination; 11. A computer-implemented method comprising:

[0112] 2. The method of claim 1, wherein determining the first partition includes discarding a first complementary partition of data blocks based on metadata and a condition that the first data set must satisfy according to the first query, the first complementary partition of data blocks representing data blocks of data that are not accessed when the first query execution plan is executed in the RDBS; and determining the second partition includes discarding a second complementary partition of data blocks using metadata and a condition that the second data set must satisfy according to the second query, the second complementary partition of data blocks representing data blocks of data that are not accessed when the second query execution plan is executed in the RDBS.

[0113] 3. The method of claim 1 or 2, further comprising: if there is no common partition between data blocks of the first partition and the second partition, scheduling the first query execution plan and the second query execution plan such that the first query execution plan and the second query execution plan are executed in parallel in the RDBS.

[0114] 3. The method of claim 1 or 2, further comprising scheduling the first query execution plan and the second query execution plan such that, if there is a common partition between data blocks of the first partition and the second partition, results of the first query execution plan are available in cache memory of the RDBS for use by the second query execution plan.

[0115] 4. The method of claim 1, 2 or 3, further comprising deactivating a locking mechanism of the RDBS for locking at least a portion of a first partition of data blocks and a second partition of data blocks, wherein the locking mechanism ensures that these data blocks can only be accessed by execution of a single query execution plan at a given moment, and the locking mechanism is deactivated if there is no common partition between the data blocks of the first partition and the second partition.

[0116] 5. The method of claim 1, 2 or 4, further comprising activating a locking mechanism of the RDBS to lock data blocks of a common partition such that these data blocks can only be accessed by execution of a single query execution plan at a given moment, the locking mechanism being activated if a common partition exists between data blocks of a first partition and a second partition.

[0117] 7. The method according to one of clauses 1 to 6, wherein the respective information about the properties of the data set of the respective data blocks is a range within which the data values ​​of the data set of the respective data blocks lie, the range being determined by the minimum data value in the respective data block and the maximum data value in the respective data block.

[0118] 8. The method of claim 7, wherein data for the RDBS is stored in the RDBS using data tables, ranges are defined by the minimum data value in the data table column in each data block and the maximum data value in the data table column in each data block, and each data block represents a respective block of rows in the data table.

[0119] 7. The method according to one of clauses 1 to 6, wherein the property of the data set is a distribution of data values ​​of the data set within individual data blocks, and the individual information about the property of the data set for the individual data blocks describes a distribution of data values.

[0120] 10. The method of claim 9, wherein the data in the RDBS is stored in the RDBS using data tables, the distribution refers to the distribution of data values ​​in the columns of the data tables within individual data blocks, the individual information about the properties of the data set in the individual data blocks describes the distribution of data values ​​in the columns of the data tables within the individual data blocks, and the individual data blocks represent individual blocks of rows in the data tables.

[0121] 11. The method of claim 9 or 10, wherein the distribution is represented by a density vector.

[0122] 12. The method according to one of clauses 1 to 11, wherein one of the two query execution plans, i.e. the first or the second query execution plan, is running at a moment in time in reality, and the other of the two query execution plans is scheduled to start at a moment in time in the future.

[0123] 13. The method of clause 1, 2, 4, 6, 7, 8, 9, 10, 11 or 12, wherein the first query execution plan and the second query execution plan are scheduled to execute immediately after each other.

[0124] 14. The method of one of clauses 1 to 13, wherein the method further comprises receiving metadata from a query optimizer of the RDBS.

[0125] 15. The method of one of clauses 1 to 14, wherein the method further comprises receiving information from a query optimizer of the RDBS to specify the first partition and the second partition.

[0126] 16. The method of one of clauses 1 to 15, wherein the method further comprises setting boundary conditions for running the query optimizer of the RDBS such that there are no common partitions.

[0127] 17. A computer program product comprising a computer readable storage medium having embodied thereon computer readable program code configured to implement a method according to one of clauses 1 to 16.

[0128] 1. A computer system for scheduling a set of query execution plans, the set of query execution plans including at least a first query execution plan for executing a first query to access a first data set of data of a relational database system, RDBS, and a second query execution plan for executing a second query to access a second data set of data, the data being divided into data blocks of the data set of data, metadata of the RDBS including respective information about at least one property of the data set of each of the data blocks, and the computer system scheduling the set of query execution plans to access the first data set of data when the first query execution plan is executed in the RDBS. determining, based on the metadata and a condition that the first data set must satisfy according to the first query, a first partition of data blocks that may be accessed when a second query execution plan is executed in the RDBS, based on the metadata and a condition that the second data set must satisfy according to the second query; determining, based on the metadata and a condition that the second data set must satisfy according to the second query, a second partition of data blocks that may be accessed when a second query execution plan is executed in the RDBS; performing a check for a common partition between data blocks of the first partition and the second partition; and scheduling the first query execution plan and the second query execution plan in the RDBS based on a result of the check.

Claims

1. 1. A computer-implemented method for scheduling a set of query plans, the set of query plans including at least a first query plan for executing a first query to access a first data set of data in a relational database system (RDBS), and a second query plan for executing a second query to access a second data set of the data, the data being divided into data blocks of the data set, and metadata of the RDBS including respective information about at least one property of the data set for each of the data blocks, the method comprising: determining a first partition of the data blocks to be accessed when the first query execution plan is executed on the RDBS based on the metadata and a condition that the first data set must satisfy according to the first query, wherein determining the first partition includes discarding a first complementary partition of the data blocks based on the metadata and the condition that the first data set must satisfy according to the first query, wherein the first complementary partition of the data blocks represents a data block of the data that is not accessed when the first query execution plan is executed on the RDBS; determining a second partition of the data blocks to be accessed when the second query execution plan is executed on the RDBS based on the metadata and another condition that the second data set must satisfy according to the second query, wherein the determining the second partition includes discarding a second complementary partition of the data blocks using the metadata and the condition that the second data set must satisfy according to the second query, wherein the second complementary partition of the data blocks represents a data block of the data that is not accessed when the second query execution plan is executed on the RDBS; checking whether there is a common partition between the data blocks of the first partition and the second partition, and if the first partition of the data block and the second partition of the data block are not disjoint, determining that there is a common partition between the data blocks of the first partition and the second partition that prevents parallel execution of the first query execution plan and the second query execution plan on the RDBS; If there is no common partition between the data blocks of the first partition and the second partition based on the check, generating schedules for the first query execution plan and the second query execution plan so that the first query execution plan and the second query execution plan are executed in parallel on the RDBS; scheduling the first query execution plan and the second query execution plan in the RDBS based on the schedule; 11. A computer-implemented method comprising:

2. scheduling the first query execution plan and the second query execution plan so that the first query execution plan and the second query execution plan are executed in parallel in the RDBS when there is no common partition between data blocks of the first partition and the second partition; The method of claim 1 further comprising:

3. 3. The method of claim 1, further comprising: scheduling the first query execution plan and the second query execution plan such that, if the first partition and the second partition have a common partition of data blocks, results of the first query execution plan are available in a cache memory of the RDBS for use by the second query execution plan.

4. 4. The method of claim 1, further comprising deactivating a locking mechanism of the RDBS for locking at least a portion of the first partition of the data block and the second partition of the data block, wherein the locking mechanism allows the data block to be accessed only by execution of a single query execution plan at a given moment, and the locking mechanism is deactivated if there is no common partition between the data blocks of the first partition and the second partition.

5. activating a locking mechanism of the RDBS for locking the data blocks of the common partition so that the data blocks are accessed only by execution of a single query execution plan at a given moment, the locking mechanism being activated when there is a common partition between data blocks of the first partition and the second partition; 4. The method of claim 1, claim 2, or claim 3, further comprising:

6. 6. The method of claim 1, wherein the individual information about the property of the data set of the individual data block is a range within which data values ​​of the data set of the individual data block lie, the range being defined by a minimum data value in the individual data block and a maximum data value in the individual data block.

7. 7. The method of claim 6, wherein the data in the RDBS is stored in the RDBS using data tables, the ranges being defined by the minimum data value in a column of the data table in the respective data blocks and the maximum data value in the column of the data table in the respective data blocks, and the respective data blocks representing respective blocks of rows of the data table.

8. the property of the data set is a distribution of data values ​​of the data set within the respective data blocks, and the respective information about the property of the data set of the respective data blocks describes the distribution of the data values. The method according to any one of claims 1 to 7.

9. 9. The method of claim 8, wherein the data in the RDBS is stored in the RDBS using data tables, the distribution refers to the distribution of the data values ​​in a column of the data table within the individual data blocks, the individual information about the property of the data set in the individual data blocks describes the distribution of the data values ​​in the column of the data table within the individual data blocks, and the individual data blocks represent individual blocks of rows of the data table.

10. The method of claim 8 , wherein the distribution is represented by a density vector.

11. 11. The method of claim 1, wherein one of the two query execution plans, i.e., the first or the second query execution plan, is running at a certain actual moment, and the other of the two query execution plans is scheduled to start at a certain future moment.

12. The method of claim 3 , wherein the first query execution plan and the second query execution plan are scheduled to execute immediately after each other.

13. The method of any one of claims 1 to 12, wherein the method further comprises receiving the metadata from a query optimizer of the RDBS.

14. The method of any one of claims 1 to 12, further comprising receiving information from a query optimizer of the RDBS to specify the first partition and the second partition.

15. The method of any one of claims 1 to 14, wherein the method further comprises setting a boundary condition for executing a query optimizer of the RDBS such that the common partition is eliminated.

16. 1. A computer program product for scheduling a set of query execution plans, the set of query execution plans including at least a first query execution plan for executing a first query to access a first data set of data in a relational database system (RDBS), and a second query execution plan for executing a second query to access a second data set of the data, the data being divided into data blocks of the data set, and metadata of the RDBS including respective pieces of information about at least one property of the data set for respective pieces of the data blocks; program instructions for a computer to determine, based on the metadata and a condition that the first data set must satisfy according to the first query, a first partition of the data blocks that will be accessed when the first query execution plan is executed on the RDBS, wherein determining the first partition comprises discarding a first complementary partition of the data blocks based on the metadata and the condition that the first data set must satisfy according to the first query, and the first complementary partition of the data blocks represents a data block of the data that is not accessed when the first query execution plan is executed on the RDBS; program instructions for determining, based on the metadata and another condition that the second data set must satisfy according to the second query, a second partition of the data blocks that will be accessed when the second query execution plan is executed on the RDBS, wherein the determining the second partition includes discarding a second complementary partition of the data blocks using the metadata and the condition that the second data set must satisfy according to the second query, the second complementary partition of the data blocks representing data blocks of the data that will not be accessed when the second query execution plan is executed on the RDBS; program instructions for checking whether there is a common partition between data blocks of the first partition and the second partition, wherein if the first partition of the data block and the second partition of the data block are not disjoint, determining that there is a common partition between data blocks of the first partition and the second partition that prevents parallel execution of the first query execution plan and the second query execution plan on the RDBS; program instructions for generating a schedule for the first query execution plan and the second query execution plan based on the check, such that the first query execution plan and the second query execution plan are executed in parallel in the RDBS if there is no common partition between data blocks of the first partition and the second partition; program instructions for scheduling the first query execution plan and the second query execution plan in the RDBS based on the schedule; A computer program that executes the following:

17. 1. A computer system for scheduling a set of query plans, the set of query plans including at least a first query plan for executing a first query to access a first data set of data in a relational database system (RDBS), and a second query plan for executing a second query to access a second data set of the data, the data being divided into data blocks of the data set, and metadata of the RDBS including respective pieces of information about at least one property of the data set for respective pieces of the data blocks, the computer system comprising: determining a first partition of the data blocks to be accessed when the first query execution plan is executed on the RDBS based on the metadata and a condition that the first data set must satisfy according to the first query, wherein determining the first partition includes discarding a first complementary partition of the data blocks based on the metadata and the condition that the first data set must satisfy according to the first query, wherein the first complementary partition of the data blocks represents a data block of the data that is not accessed when the first query execution plan is executed on the RDBS; determining a second partition of the data blocks to be accessed when the second query execution plan is executed on the RDBS based on the metadata and another condition that the second data set must satisfy according to the second query, wherein determining the second partition includes discarding a second complementary partition of the data blocks using the metadata and the condition that the second data set must satisfy according to the second query, wherein the second complementary partition of the data blocks represents a data block of the data that is not accessed when the second query execution plan is executed on the RDBS; checking whether there is a common partition between the data blocks of the first partition and the second partition, and if the first partition of the data block and the second partition of the data block are not disjoint, determining that there is a common partition between the data blocks of the first partition and the second partition that prevents parallel execution of the first query execution plan and the second query execution plan on the RDBS; generating a schedule for the first query execution plan and the second query execution plan based on the checking, so that the first query execution plan and the second query execution plan are executed in parallel in the RDBS when there is no common partition between the data blocks of the first partition and the second partition; scheduling the first query execution plan and the second query execution plan in the RDBS based on the schedule; A computer system configured for:

18. scheduling the first query execution plan and the second query execution plan so that the first query execution plan and the second query execution plan are executed in parallel in the RDBS when there is no common partition between data blocks of the first partition and the second partition; 20. The computer system of claim 17, further configured for:

Citation Information

Patent Citations

  • Database system and data processing method

    JP2018101217A

  • Parallel execution of range query

    US20100082655A1

  • Function semantic based partition-wise SQL execution and partition pruning

    US20190087457A1