KR20190030165A - System and method for parallel query processing based on jit compilation - Google Patents

System and method for parallel query processing based on jit compilation Download PDF

Info

Publication number
KR20190030165A
KR20190030165A KR1020180105438A KR20180105438A KR20190030165A KR 20190030165 A KR20190030165 A KR 20190030165A KR 1020180105438 A KR1020180105438 A KR 1020180105438A KR 20180105438 A KR20180105438 A KR 20180105438A KR 20190030165 A KR20190030165 A KR 20190030165A
Authority
KR
South Korea
Prior art keywords
jit
execution plan
compilation
execution
unit
Prior art date
Application number
KR1020180105438A
Other languages
Korean (ko)
Inventor
이미영
Original Assignee
한국전자통신연구원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 한국전자통신연구원 filed Critical 한국전자통신연구원
Priority to US16/129,407 priority Critical patent/US20190079972A1/en
Publication of KR20190030165A publication Critical patent/KR20190030165A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • G06F9/45516Runtime code conversion or optimisation
    • G06F9/4552Involving translation to a different instruction set architecture, e.g. just-in-time translation in a JVM

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

The present invention relates to a system applying query optimization of a query based on just-in-time (JIT) compilation when processing a parallel query in processing in query processing based on JIT compilation and a method thereof. According to the present invention, the system comprises: a parallel processing scheduler constructing a DB operation graph and dependency information between operations and distributing performing business; and workers executing a query execution code, wherein the workers include a worker executing a JIT complied execution code and a worker executed in an interpreter method.

Description

JIT 컴파일 기반 병렬 질의 처리 시스템 및 그 방법{SYSTEM AND METHOD FOR PARALLEL QUERY PROCESSING BASED ON JIT COMPILATION}[0001] SYSTEM AND METHOD FOR PARALLEL QUERY PROCESSING BASED ON JIT COMPILATION [0002]

본 발명은 Just-in-time(JIT) 컴파일 기반으로 질의를 처리함에 있어서, JIT 컴파일 기반의 질의 최적화를 적용하여 병렬 질의 처리를 수행하는 시스템 및 그 방법에 관한 것이다. The present invention relates to a system and method for performing parallel query processing by applying query optimization based on JIT compilation in query processing based on just-in-time (JIT) compilation.

종래 기술에 따른 데이터베이스 시스템의 질의 처리에는 인터프리터 방식과 컴파일 방식이 적용된다. An interpreter method and a compilation method are applied to the query processing of the database system according to the related art.

종래 기술에 따른 인터프리터 방식은 캐시, 메모리 등 자원을 효율적으로 사용하지 못하는 단점이 있고, 컴파일 방식은 질의 변경 시 마다 실행기를 재구성하여야 하고, 컴파일 오버헤드가 발생되는 문제점이 있다. The interpreter method according to the related art has a disadvantage in that resources such as cache and memory can not be used efficiently, and the compilation method has to reconfigure the execution unit every time a query is changed, and there is a problem that a compilation overhead occurs.

본 발명은 전술한 문제점을 해결하기 위하여 제안된 것으로, 단일 질의 내 병렬 처리 환경에서 전체 질의 실행 플랜뿐 아니라, 부분 질의 실행 플랜에 대해 JIT 컴파일한 경우에도 통합 병렬 처리 제어가 가능한 JIT 컴파일 기반 병렬 질의 처리 시스템 및 그 방법을 제공하는데 그 목적이 있다. The present invention has been proposed in order to solve the above-mentioned problems. It is an object of the present invention to provide a JIT-based parallel query capable of controlling integrated parallel processing not only in the whole query execution plan in a single query parallel processing environment, Processing system and method therefor.

본 발명에 따른 JIT 컴파일 기반 병렬 질의 처리 시스템은 DB 연산 그래프와 연산간 의존관계 정보를 구성하고, 수행 업무를 분배하는 병렬처리 스케줄러 및 질의 실행코드를 실행하는 복수의 워커로 구성되며, 워커는 JIT 컴파일드 실행코드를 실행하는 워커와 인터프리터 방식으로 실행하는 워커를 포함하는 것을 특징으로 한다. The JIT compilation based parallel query processing system according to the present invention comprises a DB operation graph and a parallel processing scheduler for distributing execution tasks and a plurality of workers for executing query execution codes, A walker for executing the compiled executable code and a walker for executing the executable in an interpreter manner.

본 발명에 따른 JIT 컴파일드 실행 코드 생성 시스템은 DB 연산 그래프 중 JIT 컴파일 대상이 되는 서브 그래프 정보와 연산간 기본 의존관계 정보를 수신하여 연산간 확장 의존관계 정보를 구성하고, IR 기반 서브 실행 플랜을 최적화하는 JIT 실행 플랜 최적화부와, 서브 그래프 정보와 연산간 확장 의존 관계 정보를 기반으로 병렬 처리를 위한 IR 기반 서브 실행 플랜을 구성하고, IR 기반 서브 실행 플랜을 컴파일하여 컴파일드 실행 코드를 생성하는 JIT 실행 플랜 생성부 및 JIT 실행 플랜 최적화부와 JIT 실행 플랜 생성부의 수행을 제어하는 JIT 질의 실행부를 포함하는 것을 특징으로 한다. The JIT-compiled executable code generation system according to the present invention receives subgraph information and inter-operation basic dependency information as a target of JIT compilation in the DB operation graph to construct inter-operation extended dependency information, The JIT execution plan optimizing unit that optimizes the JIT execution plan and the IR based sub execution plan for parallel processing based on the subgraph information and the extended dependency information between the operation and compiles the IR based sub execution plan to generate the compiled execution code A JIT execution plan generating unit, a JIT execution plan optimizing unit, and a JIT execution plan generating unit for controlling the execution of the JIT execution plan generating unit.

본 발명에 따른 JIT 컴파일 기반 병렬 질의 처리 방법은 DB 연산 그래프로부터 병렬 처리를 위한 연산간 의존 관계 정보를 구성하는 단계와, JIT 컴파일 대상이 되는 DB 연산 서브 그래프에 대해 연산간 확장 의존관계 정보를 구성하는 단계와, DB 연산 서브 그래프와 연산간 확장 의존관계 정보를 이용하여 IR 기반 서브 실행 플랜을 구성하는 단계와, IR 기반 서브 실행 플랜을 이용하여 컴파일드 실행코드를 구성하는 단계와, 연산간 확장 의존관계 정보를 기반으로 병렬 처리 스케줄링을 시작하는 단계와, 스케줄링 대상이 JIT 컴파일 대상이 아닌 경우, 인터프리터를 실행하는 단계 및 스케줄링 대상이 JIT 컴파일 대상인 경우, 컴파일드 실행 코드 내의 함수포인터를 실행하는 단계를 포함하는 것을 특징으로 한다. The parallel query processing method based on JIT compilation according to the present invention includes a step of configuring dependency information between threads for parallel processing from a DB operation graph and a step of constructing extended dependency information between operations on a DB operation subgraph subject to JIT compilation Constructing an IR-based sub-execution plan using the DB operation sub-graph and inter-operation extension dependency information, constructing a compiled executable code using the IR-based sub-execution plan, Executing parallel processing scheduling based on dependency information, executing an interpreter when the scheduling target is not a JIT compilation target, and executing a function pointer in the compiled executable code when the scheduling target is a JIT compilation target And a control unit.

본 발명의 실시예에 따르면, JIT 컴파일 기반으로 병렬 질의 처리 성능을 향상시키는 효과가 있다. According to the embodiment of the present invention, there is an effect of improving parallel query processing performance based on JIT compilation.

JIT 컴파일에 의해 코드 최적화가 가능한 부분을 최적화하고, 컴파일된 실행 코드와 인터프리터 방식으로 실행되는 코드를 통합하여 병렬 질의 처리를 수행함으로써, 질의 처리 성능이 향상되는 효과가 있다. JIT compilation optimizes the part where code optimization is possible, and performs parallel query processing by integrating compiled executable code and code executed in an interpreter manner, thereby improving query processing performance.

본 발명의 실시예에 따르면 JIT 컴파일 실행 플랜 및 실행코드의 재활용성을 향상시키는 것이 가능한 효과가 있다. According to the embodiment of the present invention, it is possible to improve the recyclability of the JIT compilation execution plan and execution code.

본 발명의 효과는 이상에서 언급한 것들에 한정되지 않으며, 언급되지 아니한 다른 효과들은 아래의 기재로부터 당업자에게 명확하게 이해될 수 있을 것이다.The effects of the present invention are not limited to those mentioned above, and other effects not mentioned can be clearly understood by those skilled in the art from the following description.

도 1은 본 발명의 실시예에 따른 JIT 컴파일 기반 병렬 질의 처리 시스템이 적용되는 시스템의 전체 구성도를 도시한다.
도 2는 본 발명의 실시예에 따른 JIT 질의 실행부의 병렬 질의 처리 환경을 도시한다.
도 3은 본 발명의 실시예에 따른 병렬 처리를 위한 JIT 컴파일드 실행 코드 생성 및 연산간 의존관계 정보 생성 과정을 도시한다.
도 4는 본 발명의 실시예에 따른 JIT 컴파일 기반 병렬 질의 처리 과정을 나타내는 예시도이다.
도 5는 본 발명의 실시예에 따른 JIT 컴파일 기반 병렬 질의 처리 방법을 나타내는 순서도이다.
FIG. 1 shows an overall configuration of a system to which a JIT compilation based parallel query processing system according to an embodiment of the present invention is applied.
2 shows a parallel query processing environment of a JIT query execution unit according to an embodiment of the present invention.
FIG. 3 illustrates a process of generating JIT-compiled executable code for parallel processing according to an embodiment of the present invention and generating inter-application dependency information.
4 is a diagram illustrating an example of a JIT compilation based parallel query processing according to an embodiment of the present invention.
5 is a flowchart illustrating a JIT compilation based parallel query processing method according to an embodiment of the present invention.

본 발명의 전술한 목적 및 그 이외의 목적과 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시예들을 참조하면 명확해질 것이다. BRIEF DESCRIPTION OF THE DRAWINGS The above and other objects, advantages and features of the present invention and methods of achieving them will be apparent from the following detailed description of embodiments thereof taken in conjunction with the accompanying drawings.

그러나 본 발명은 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 수 있으며, 단지 이하의 실시예들은 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 목적, 구성 및 효과를 용이하게 알려주기 위해 제공되는 것일 뿐으로서, 본 발명의 권리범위는 청구항의 기재에 의해 정의된다. The present invention may, however, be embodied in many different forms and should not be construed as being limited to the exemplary embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, And advantages of the present invention are defined by the description of the claims.

한편, 본 명세서에서 사용된 용어는 실시예들을 설명하기 위한 것이며 본 발명을 제한하고자 하는 것은 아니다. 본 명세서에서, 단수형은 문구에서 특별히 언급하지 않는 한 복수형도 포함한다. 명세서에서 사용되는 "포함한다(comprises)" 및/또는 "포함하는(comprising)"은 언급된 구성소자, 단계, 동작 및/또는 소자가 하나 이상의 다른 구성소자, 단계, 동작 및/또는 소자의 존재 또는 추가됨을 배제하지 않는다.It is to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. In the present specification, the singular form includes plural forms unless otherwise specified in the specification. &Quot; comprises "and / or" comprising ", as used herein, unless the recited component, step, operation, and / Or added.

이하에서는, 당업자의 이해를 돕기 위하여 본 발명이 제안된 배경에 대하여 먼저 서술하고, 본 발명의 실시예에 대하여 서술하기로 한다. Hereinafter, the background of the present invention will be described in order to facilitate the understanding of those skilled in the art, and an embodiment of the present invention will be described.

데이터베이스 시스템의 질의 처리에는 크게 인터프리터 방식과 컴파일 방식이 적용된다.The interpreter method and the compilation method are applied to the query processing of the database system.

인터프리터 방식에 대해 살펴보면, 데이터베이스 연산 라이브러리와 DB 연산 그래프를 해석하는 인터프리터는 DB 엔진에 통합되어, DB 연산 그래프로 구성된 실행 플랜을 기반으로 연산 그래프의 각 노드의 의미를 해석하며 DB 연산을 처리한다. In interpreter method, interpreter interpreting database operation library and DB operation graph is integrated in DB engine and DB operation is processed by analyzing the meaning of each node of operation graph based on execution plan composed of DB operation graph.

이러한 종래 기술에 따른 인터프리터 방식은 다양한 질의 처리가 가능하나, 함수 호출 및 분기 등이 많으므로, 캐시, 메모리 등 자원을 효율적으로 사용하지 못하는 문제점이 있다.Such an interpreter method according to the related art can process various inquiries, but there are many function calls and branches, and therefore resources such as cache and memory can not be efficiently used.

컴파일 방식에 대해 살펴보면, 질의를 구성하는 DB 연산 그래프에 대한 해석이 완료되고, 질의 처리에 필요한 DB 연산 함수들과 이를 호출하는 제어 함수로 구성된 실행 코드를 구성 및 컴파일하여 실행한다. In the compilation method, the analysis of the DB operation graph constituting the query is completed, and the DB operation functions necessary for the query processing and the execution codes constituted by the control functions for calling the DB operation functions are constructed and compiled and executed.

이러한 종래 기술에 따른 컴파일 방식은 효율적으로 자원을 활용하여 질의 처리 성능이 향상되나, 질의가 변경될 때마다 실행기를 재구성하여야 하며, 컴파일 오버헤드가 존재하는 문제점이 있다. Such a conventional compilation method efficiently utilizes resources to improve the query processing performance, but requires reconfiguring the execution unit every time the query is changed, and there is a problem that there is a compilation overhead.

Just-in-time(JIT) 컴파일 방식은 질의 처리시 중간 표현(Intermediate Representation, IR) 기반 실행 플랜을 구성하고, IR 기반 실행 플랜을 동적으로 최적화 및 컴파일하여, 실행 코드를 생성 및 처리한다.The just-in-time (JIT) compilation method forms an execution plan based on an intermediate representation (IR) in query processing, dynamically optimizes and compiles an IR-based execution plan, and generates and processes executable code.

JIT 컴파일 대상은 질의 실행 플랜 전체일 수도 있고, 질의 실행 플랜을 구성하는 일부 연산일 수도 있다. The JIT compilation target may be the whole of the query execution plan or some of the operations constituting the query execution plan.

코드 최적화는 다양한 구문 기반의 최적화, DB 연산의 의미를 고려한 최적화 등이 가능하다.Code optimization can be done with various syntax-based optimizations and optimizations that take into account the semantics of DB operations.

JIT 컴파일 방식에서는 중간 표현 기반 실행 플랜 구성 방법에 따라, 중간 표현 기반 실행 플랜을 재활용하면서 동적으로 실행 상황을 반영하여 최적의 실행 코드를 생성하는 것이 가능하다. According to the JIT compilation method, it is possible to generate the optimum execution code by reflecting the execution state dynamically while reusing the intermediate expression-based execution plan according to the intermediate expression-based execution plan configuration method.

또한, 동적 상황이 변하지 않은 경우에는 컴파일드 실행 코드를 재활용하는 것이 가능하다. It is also possible to recycle the compiled executable code if the dynamic situation does not change.

그러므로, 중간 표현 기반 질의 실행 플랜 구성, 최적화 및 컴파일하여 질의 실행 코드 구성 시, 동적 실행 환경을 반영하여 코드 최적화를 수행함에 따라 획득되는 이점과 재활용 가능성간의 tradeoff를 고려하여, JIT 컴파일할 대상 및 중간 표현 구성 방법을 결정하여야 한다. Therefore, in consideration of the tradeoff between the advantages obtained by performing the code optimization reflecting the dynamic execution environment and the recyclability at the time of configuring the execution plan of the intermediate expression-based query execution plan, optimizing and compiling and constructing the query execution code, How to construct the expression should be determined.

질의 내 병렬 질의 처리는 질의 처리 성능을 높이기 위해 널리 활용되고 있는데, JIT 컴파일 환경에서 병렬 질의 처리가 가능하도록 하기 위해서는, 다음의 3가지 문제들을 고려하여야 한다. In parallel query processing in queries is widely used to improve query processing performance. In order to enable parallel query processing in the JIT compilation environment, the following three problems must be considered.

첫째, 병렬 질의 처리는 질의 실행 플랜인 DB 연산 그래프를 구성하는 노드들 간의 의존 관계를 분석하여, 의존 관계가 있는 부분들은 순차 처리하고, 의존 관계가 없는 부분들은 병렬로 처리한다. 따라서, 일부 연산만 JIT 컴파일된 환경에서는 인터프리터 기반 연산과 JIT 컴파일된 실행 코드가 수행하는 연산에 대한 통합 스케줄링이 가능하여야 한다.First, the parallel query processing analyzes the dependency relation between the nodes constituting the DB operation graph, which is the query execution plan, and sequentially processes the parts having dependency and processes the parts without dependency in parallel. Therefore, in a JIT compiled environment, it is necessary to perform integrated scheduling for operations performed by interpreter-based and JIT-compiled executable code.

둘째, JIT 컴파일된 실행 코드 내에 여러 연산 노드들이 포함된 경우, 연산 노드들의 관계 및 실행 환경에 따라 순차 처리하는 것이 효율적일 수 있고, 반면 분할하여 병렬 처리하는 것이 효율적일 수 있는 바, JIT 컴파일된 실행 코드에 대한 병렬 처리 제어가 가능하여야 한다.Second, in the case where a plurality of operation nodes are included in the JIT-compiled executable code, sequential processing may be efficient depending on the relationship of operation nodes and execution environment, while it is effective to perform parallel processing in parallel, It should be possible to control the parallel processing of the data.

셋째, 병렬 처리에 할당될 스레드 집합 등 병렬 처리 환경은 동적으로 변하기 때문에, 일반적으로 질의 내 병렬성은 질의 실행 시 결정되며, 스케줄러 또는 코디네이터를 이용하여 병렬 처리 제어가 수행된다. 따라서, 동적으로 변하는 병렬 처리 환경과 JIT 컴파일 실행 코드의 의존성을 분리하여야 한다.Third, because the parallel processing environment such as a thread set to be allocated to parallel processing changes dynamically, in general, intra-query parallelism is determined at the time of query execution, and parallel processing control is performed using a scheduler or a coordinator. Therefore, the dependency of the JIT compiled executable code must be separated from the dynamically changing parallel processing environment.

본 발명은 전술한 기술적 과제를 달성하는 JIT 컴파일 기반 병렬 질의 처리 시스템 및 그 방법에 관한 것으로, JIT 컴파일 환경에서도 단일 질의 내 병렬 처리를 제공하는 것이 가능하다. The present invention relates to a JIT compilation based parallel query processing system and method thereof, and it is possible to provide a single query parallel processing even in a JIT compilation environment.

본 발명에 따르면, 전체 질의 실행 플랜뿐만 아니라 부분 질의 실행 플랜을 JIT 컴파일한 경우에도, 통합 병렬 처리가 가능하다.According to the present invention, integrated parallel processing is possible even when the partial query execution plan is JIT-compiled as well as the entire query execution plan.

또한, 본 발명에 따르면, JIT 컴파일된 실행 코드에 대한 병렬 제어가 가능하다.Also, according to the present invention, parallel control of JIT compiled executable code is possible.

또한, 본 발명에 따르면 JIT 컴파일된 실행 플랜 및 실행코드의 재활용성을 증대시켜, 중간 표현 및 머신 코드의 재생성을 방지한다. Further, according to the present invention, recyclability of JIT compiled execution plans and executable codes is increased, thereby preventing the intermediate representation and machine code from being regenerated.

도 1은 본 발명의 실시예에 따른 JIT 컴파일 기반 병렬 질의 처리 시스템이 적용되는 시스템의 전체 구성도를 도시한다. FIG. 1 shows an overall configuration of a system to which a JIT compilation based parallel query processing system according to an embodiment of the present invention is applied.

데이터 저장 시스템(100)은 데이터 저장, 동시성 제어, 트랜잭션 관리를 수행한다. The data storage system 100 performs data storage, concurrency control, and transaction management.

질의 처리 시스템(200)은 질의문 파싱, 질의 최적화, 질의 실행을 수행한다. The query processing system 200 performs query statement parsing, query optimization, and query execution.

본 발명의 실시예에 따른 질의 처리 시스템(200)은 질의문 파서(210), 질의 최적화부(220), JIT 대상 선정부(230), JIT 실행 플랜 생성부(250), JIT 실행 플랜 최적화부(260) 및 JIT 질의 실행부(240)를 포함한다.The query processing system 200 according to the embodiment of the present invention includes a query statement parser 210, a query optimization unit 220, a JIT target selection unit 230, a JIT execution plan generation unit 250, (260) and a JIT query execution unit (240).

질의문 파서(210)는 질의문을 파싱하여 파스 트리를 생성한다.The query statement parser 210 parses the query statement to generate a parse tree.

질의 최적화부(220)는 최적화된 실행 플랜을 구성한다. The query optimization unit 220 constitutes an optimized execution plan.

JIT 대상 선정부(230)는 질의문 파서(210)로부터 수신한 파스 트리 또는 질의 최적화부(220)를 통해 최적화된 실행 플랜을 기반으로, JIT 컴파일할 대상을 선정한다.The JIT target selection unit 230 selects an object to be JIT compiled based on the optimized execution plan through the parse tree or query optimization unit 220 received from the query statement parser 210.

JIT 실행 플랜 생성부(250)는 JIT 컴파일할 서브 실행 플랜을 대상으로 IR(중간 표현) 기반 서브 실행 플랜을 구성하고, JIT 컴파일드 실행 코드를 구성한다. The JIT execution plan generation unit 250 forms an IR (intermediate expression) based sub execution plan for a sub execution plan to be JIT compiled, and constitutes a JIT compiled execution code.

JIT 실행 플랜 생성부(250)는 JIT 실행 플랜 최적화부(260)를 이용하여 최적화된 IR 기반 실행 플랜 및 컴파일드 실행 코드를 구성한다. The JIT execution plan generating unit 250 configures an optimized IR based execution plan and a compiled execution code using the JIT execution plan optimizing unit 260. [

JIT 질의 실행부(240)는 IR 기반 서브 실행 플랜 및 컴파일드 실행 코드의 생성을 제어하며, 인터프리터 코드와 JIT 컴파일드 실행 코드를 혼용하여 질의 처리를 수행한다.The JIT query execution unit 240 controls the generation of the IR-based sub execution plan and the compiled execution code, and performs the query processing by mixing the interpreter code and the JIT compiled execution code.

도 2는 본 발명의 실시예에 따른 JIT 질의 실행부의 병렬 질의 처리 환경을 도시한다. 2 shows a parallel query processing environment of a JIT query execution unit according to an embodiment of the present invention.

동적으로 실행 환경을 반영하여 병렬 처리를 수행하기 위하여, 본 발명의 실시예에 따른 병렬 처리 스케줄러(243)는 동적으로 DB 연산 처리를 스케줄링한다. In order to perform parallel processing reflecting the execution environment dynamically, the parallel processing scheduler 243 according to the embodiment of the present invention schedules the DB operation processing dynamically.

병렬 처리 스케줄러(243)는 도 2에 도시된 바와 같이, DB 연산 그래프(241)와 연산간 의존관계 정보(242)를 입력 받고, 실제 DB 연산 수행을 위해 할당된 워커들(244)에게 수행 대상 업무를 분배한다. As shown in FIG. 2, the parallel processing scheduler 243 receives the DB operation graph 241 and inter-operation dependency information 242, and instructs the worker 244, which is allocated for actual DB operation, Distribute work.

연산간 의존관계 정보(242)는 DB 연산 그래프(241)를 기반으로, 병렬 처리가 가능한 단위로 재구성된 정보로, 병렬 처리 단위는 DB 연산 그래프(241)를 구성하는 노드별 단위이거나, 서브그래프 단위일 수 있다. The interworking dependency information 242 is information reconstructed in units capable of parallel processing based on the DB operation graph 241. The parallel processing unit is a unit for each node constituting the DB operation graph 241, Lt; / RTI >

연산간 의존관계 정보(242)에 있어서, JIT 컴파일 대상이 되는 연산들에 대해서는 JIT 컴파일 대상임을 나타내는 정보, 해당 연산을 처리할 컴파일 단위명 및 호출할 함수 정보가 추가로 포함된다. In the inter-operation dependency information 242, the operations that are subject to JIT compilation include information indicating that the JIT compilation target is a target, a compile unit name for processing the operation, and function information to be called.

본 발명의 실시예에 따른 워커(244)에는 인터프리터 기반 워커 (244a)와 JIT 컴파일드 실행 코드 기반 워커(244b)가 포함된다. The walker 244 according to an embodiment of the present invention includes an interpreter based walker 244a and a JIT compiled executable code based walker 244b.

인터프리터 기반 워커(244a)는 병렬 처리 스케줄러(243)로부터, 수행 대상이 되는 DB 연산 그래프의 범위를 전달받아 인터프리터 방식으로 DB 연산 그래프를 해석하며 수행한다.The interpreter-based worker 244a receives the range of the DB operation graph to be executed from the parallel processing scheduler 243, and interprets and executes the DB operation graph in an interpreter manner.

JIT 컴파일드 실행 코드 기반 워커(244b)는 IR 기반 서브 실행 플랜을 컴파일한 JIT 컴파일드 실행 코드 내의 호출할 함수 포인터 정보를 전달받아 해당 함수를 수행한다.The JIT compiled executable code-based walker (244b) receives the function pointer information to be called in the JIT compiled executable code compiled with the IR-based sub execution plan, and executes the corresponding function.

본 발명의 실시예에 따르면, JIT 컴파일드 실행 코드의 구성 시, 외부 호출이 가능한 함수 집합으로 구성된 라이브러리를 구축하고, 외부에서 가변적으로 JIT 컴파일드 실행 코드를 스케줄링함으로써 특정 부분을 실행시키는 것이 가능하다. According to the embodiment of the present invention, it is possible to construct a library composed of a function set capable of external calling when executing JIT-compiled executable code, and to execute a specific part by scheduling the JIT-compiled executable code externally .

JIT 질의 실행부(240)는 병렬 질의 처리시 연산간 의존관계 정보로부터 관련 정보를 얻어 해당되는 함수 포인터를 직접 실행함으로써, JIT 컴파일된 실행 코드에 대한 병렬 제어가 가능하다.The JIT query execution unit 240 can perform parallel control on the JIT-compiled executable code by directly obtaining the relevant function pointer from the inter-execution dependency information in the parallel query processing.

도 3은 본 발명의 실시예에 따른 병렬 처리를 위한 JIT 컴파일드 실행 코드 생성 및 연산간 의존관계 정보 생성 과정을 도시한다. FIG. 3 illustrates a process of generating JIT-compiled executable code for parallel processing according to an embodiment of the present invention and generating inter-application dependency information.

병렬 처리를 위한 JIT 컴파일드 실행 코드와 연산간 의존관계 정보 생성 과정은, 연산간 기본 의존관계 정보 구성 단계, 연산간 확장 의존관계 정보 구성 단계, 병렬 처리용 IR 기반 서브 실행 플랜 구성 단계, 병렬 처리용 IR 기반 서브 실행 플랜 최적화 단계 및 컴파일드 실행 코드 생성 단계로 구성되며, 전술한 각 단계는 JIT 질의 실행부(240)에 의해 수행되거나 제어된다. JIT compilation for parallel processing The process of generating executable code-to-operation dependency information includes the steps of constructing basic dependency information between operations, constructing extended dependency information between operations, configuring an IR-based sub-execution plan for parallel processing, Based sub-execution plan optimization step and a compiled execution code generation step, and each of the above-described steps is performed or controlled by the JIT query execution unit 240.

전술한 각 단계별 정보가 이미 구성되어 있고, 병렬 처리 환경의 변화가 발생하지 않았으면, 실행 플랜 또는 실행 코드를 재활용하고, 각 단계는 필요에 따라 통합될 수 있다. If the above-described step-by-step information has already been configured and no change has occurred in the parallel processing environment, the execution plan or execution code can be reused and each step can be integrated as needed.

도 3을 참조하면, JIT 질의 실행부(240)는 DB 연산 그래프를 기반으로, 해당 연산이 이전 연산 결과를 기반으로 처리하는지 여부를 분석하여, 연산간 기본 의존 관계를 구성한다(S300).Referring to FIG. 3, the JIT query execution unit 240 analyzes whether a corresponding operation is processed based on a DB operation graph based on a DB operation graph, and configures an inter-operation basic dependency (S300).

연산간 기본 의존 관계 정보는 연산간 수행 순서를 결정하기 위한 정보로 병렬 질의 처리 스케줄링에 활용된다.The basic dependency information between operations is used for scheduling parallel query processing as information for determining execution order between operations.

JIT 실행 플랜 최적화부(260)의 JIT 병렬성 관리부(261)는 JIT 컴파일 실행 코드에 대한 병렬 제어를 위해 필요한 연산간 확장 의존관계 정보를 구성한다. The JIT parallelism management unit 261 of the JIT execution plan optimizing unit 260 configures the inter-application extended dependency information required for parallel control of the JIT compilation execution code.

JIT 병렬성 관리부(261)는 DB 연산 그래프 중 JIT 컴파일 대상이 되는 서브그래프 정보 및 서브그래프 내 연산간 기본 의존관계 정보를 입력 받고(S305), 연산간 확장 의존 관계 정보를 구성하여 이를 JIT 질의 실행부(240)로 전달한다(S310). The JIT parallelism management unit 261 receives the subgraph information to be JIT compiled in the DB operation graph and the inter-transaction basic dependency information in the subgraph (S305), forms the inter-operation expansion dependency information, and transmits it to the JIT query execution unit (240) (S310).

연산간 확장 의존관계 정보는 연산간 기본 의존관계 정보에 대해, 컴파일드 실행 코드 생성 시, 연산에 대응되어 호출할 함수 정보가 추가된 정보이다.Extended extension dependency information is the information that the function information to be called corresponding to the operation is added when compiled executable code is generated for basic dependency information between operations.

연산간 확장 의존 관계 정보는 IR 기반 서브 실행 플랜 구성 방법 및 최적화 규칙 등을 고려하여 구성한다. 예를 들어 실행 시 전달되는 동적 매개변수 등에 의해 코드 최적화가 가능한 경우, 이를 고려하여 컴파일 단위 및 컴파일 대상 코드 내 함수 구성 방법이 결정되므로, 연산간 확장 의존 관계 정보도 이를 고려하여 구성한다.The inter-service extended dependency information is constructed in consideration of IR-based sub-execution plan composition method and optimization rule. For example, if code optimization is possible by dynamic parameters passed in execution, etc., the method of constructing the functions in the compilation unit and the compile-target code is determined in consideration of this.

JIT 질의 실행부(240)는 DB 연산 서브 그래프, 연산간 확장 의존관계를 JIT 실행플랜 생성부(250) 내의 JIT 중간 표현 관리부(251)로 전송하고, JIT 중간 표현 관리부(251)는 병렬 처리를 위한 IR 기반 서브 실행 플랜을 구성하여 이를 JIT 질의 실행부(240)로 전달한다.The JIT query execution unit 240 transmits the DB operation subgraph and inter-operation extension dependency to the JIT intermediate expression management unit 251 in the JIT execution plan generation unit 250. The JIT intermediate expression management unit 251 performs parallel processing Based sub-execution plan and transmits it to the JIT query execution unit 240. [

JIT 중간 표현 관리부(251)는 동적 컴파일을 위한 컴파일 단위 및 외부 호출 단위를 고려하여 IR 기반 서브 실행 플랜을 구성한다.The JIT intermediate representation management unit 251 configures an IR-based sub execution plan in consideration of a compilation unit and an external call unit for dynamic compilation.

예를 들어 동적 최적화 및 컴파일이 필요한 연산과 아닌 연산을 하나의 컴파일 단위로 묶으면 비효율적이며, 병렬 처리가 가능한 연산들은 별도의 함수로 구성해야 하며, 순차 처리해야 할 연산들은 통합하여 하나의 함수 구성이 가능하다. 또한 동일한 함수가 동시에 구동될 가능성이 있으면, MT-safe한 코드가 생성되도록 함수를 구성한다For example, it is inefficient to bundle operations that require dynamic optimization and compilation into a single compilation unit. Operations that can perform parallel processing must be configured as separate functions. Operations that must be sequentially processed are combined to form a single function This is possible. Also, if the same function is likely to be running at the same time, construct a function so that MT-safe code is generated

JIT 중간 표현 관리부(251)의 IR 기반 서브 실행 플랜 구성시, 필요에 따라 JIT 실행 플랜 최적화부(260) 내의 JIT 최적화 실행부(262)에 의한 최적화가 가능하다. Optimization by the JIT optimization execution unit 262 in the JIT execution plan optimizing unit 260 is possible when the IR-based sub execution plan of the JIT intermediate expression management unit 251 is configured as needed.

JIT 최적화 실행부(262)는 IR 기반 서브 실행 플랜을 구성하는 중간 표현 코드를 입력 받고(S320), 실행 플랜 및 실행 환경을 고려하여 적절한 최적화 규칙을 선별하고 최적화를 수행한다(S325). The JIT optimization execution unit 262 receives the intermediate representation code constituting the IR-based sub execution plan (S320), selects an appropriate optimization rule in consideration of the execution plan and the execution environment, and performs optimization (S325).

이 때, 동적 매개 변수 바인딩에 의해 발생되는 동적 코드 최적화를 제외하고, 정적 최적화를 실시한다.At this time, static optimization is performed except for dynamic code optimization caused by dynamic parameter binding.

JIT 실행 플랜 생성부(250)의 JIT 실행 코드 생성부(252)는 IR 기반 서브 실행 플랜을 동적으로 컴파일하여, 실행 코드를 생성한다(S350). The JIT execution code generation unit 252 of the JIT execution plan generation unit 250 dynamically compiles the IR-based sub execution plan and generates an execution code (S350).

JIT 실행 코드 생성부(252)는 실행 코드 생성시, JIT 최적화 실행부(262)의 최적화 수행 이후, 머신 코드를 생성한다(S350). The JIT execution code generation unit 252 generates a machine code after optimization of the JIT optimization execution unit 262 at the time of generating the execution code (S350).

JIT 최적화 실행부(262)는 IR 기반 서브 실행 플랜을 구성하는 중간 표현 코드를 입력받고(S340), 실행 플랜 및 실행 환경을 고려하여 적절한 최적화 규칙(263)을 선별하여 최적화를 수행한다(S345). The JIT optimization execution unit 262 receives an intermediate representation code constituting the IR-based sub execution plan (S340), selects an appropriate optimization rule 263 in consideration of the execution plan and the execution environment, and performs optimization (S345) .

이 때, JIT 최적화 실행부(262)는 동적 매개 변수 바인딩에 의해 발생되는 동적 코드 최적화를 실시한다.At this time, the JIT optimization execution unit 262 performs dynamic code optimization generated by the dynamic parameter binding.

도 4는 본 발명의 실시예에 따른 JIT 컴파일 기반 병렬 질의 처리 과정을 나타내는 예시도이다. 4 is a diagram illustrating an example of a JIT compilation based parallel query processing according to an embodiment of the present invention.

본 발명의 실시예를 설명하기 위해, 다음과 같이 가정한다. In order to explain the embodiment of the present invention, the following is assumed.

1) JIT 컴파일할 대상으로 DB 연산 서브그래프(402)가 선정되었다고 가정한다.1) It is assumed that the DB operation sub-graph 402 is selected as the object to be JIT-compiled.

2) 연산간 확장 의존관계는 DB 연산 그래프 노드별로 구성되며, 최적화에 의한 연산 통합 등의 재구성은 없다고 가정한다. 2) It is assumed that the extended dependency between operations is composed by each DB operation graph node, and there is no reconfiguration such as operation integration by optimization.

3) JIT 컴파일 대상 판명은 연산간 확장 의존관계 정보에 포함된 함수 정보(function)를 이용함을 가정한다.3) It is assumed that the name of JIT compile target uses function information (function) included in interdependency extended dependency information.

4) 함수 정보(function)에는 컴파일 단위 및 컴파일 단위 내 호출할 함수명 정보가 포함된다.4) The function information includes function name information to be called in the compilation unit and compile unit.

도 4를 참조하면, JIT 실행 플랜 최적화부(260)의 JIT 병렬성 관리부(261)는 5개의 노드들로 구성된 DB 연산 서브그래프(402)와 연산간 기본 의존관계 정보(406)를 입력받고, 함수 정보가 반영된 연산간 확장 의존관계 정보(407)를 구성한다. 4, the JIT parallelism management unit 261 of the JIT execution plan optimizing unit 260 receives the DB operation sub-graph 402 composed of five nodes and the inter-operation basic dependency information 406, Information between the interworking extended dependency information 407 and the extended interworking extended dependency information 407.

도 4의 op는 질의 연산이고, waiting은 선행 연산이며, using은 후행 연산을 의미한다.In Fig. 4, op is a query operation, waiting is a preceding operation, and using is a post operation.

JIT 실행 플랜 생성부(250)의 JIT 중간 표현 관리부(251)는 5개의 노드들로 구성된 DB 연산 서브그래프(402)와 연산간 확장 의존관계 정보(407)를 입력받고, IR 기반 서브 실행 플랜(408)을 구성한다. The JIT intermediate representation management unit 251 of the JIT execution plan generation unit 250 receives the DB operation subgraph 402 composed of five nodes and the interworking extended dependency information 407 and receives the IR based sub execution plan 408).

JIT 실행 플랜 생성부(250)의 JIT 실행 코드 생성부(252)는 IR 기반 서브 실행 플랜(408)을 컴파일하여 JIT 컴파일드 실행 코드(409)를 생성한다.The JIT execution code generation unit 252 of the JIT execution plan generation unit 250 compiles the IR-based sub execution plan 408 to generate the JIT-compiled execution code 409. [

JIT 질의 실행부(240)는 DB 연산 그래프 기반 실행 플랜과 연산간 확장 의존관계 정보를 기반으로, e7(405)와 같이 인터프리터로 수행할 연산인 경우 인터프리터 코드를 실행한다.The JIT query execution unit 240 executes the interpreter code in the case of an operation to be performed by the interpreter, such as e7 405, based on the DB operation graph based execution plan and inter-operation extended dependency information.

또한, JIT 질의 실행부(240)는 e5(403)와 같이 컴파일드 방식으로 수행할 대상이면, 컴파일드 실행 코드(409)내의 해당 함수인 f2 함수 포인터를 직접 실행한다. The JIT query execution unit 240 directly executes an f2 function pointer, which is a corresponding function in the compiled execution code 409, if the object is to be executed in a compiled manner, such as e5 (403).

도 5는 본 발명의 실시예에 따른 JIT 컴파일 기반 병렬 질의 처리 방법을 나타내는 순서도이다. 5 is a flowchart illustrating a JIT compilation based parallel query processing method according to an embodiment of the present invention.

본 발명의 실시예에 따르면, JIT 컴파일 실행 코드와 인터프리터 코드를 통합하여 병렬 질의 처리를 수행하며, 도 5에 도시된 병렬 질의 처리 방법은 질의문 파서(210), 질의 최적화부(220), JIT 대상 선정부(230)의 수행 결과를 입력받아 JIT 실행 플랜 생성부(250), JIT 실행 플랜 최적화부(260) 및 JIT 질의 실행부(240)가 상호 협력하여 수행된다.The parallel query processing method shown in FIG. 5 includes a query statement parser 210, a query optimizer 220, a JIT compiler 220, The JIT execution plan generating unit 250, the JIT execution plan optimizing unit 260, and the JIT query executing unit 240 are performed in cooperation with each other by receiving the execution result of the target selecting unit 230.

JIT 질의 실행부(240)는, 질의문 파서의 질의문 파싱, 질의 최적화부의 질의 최적화 및 JIT 대상 선정부의JIT 대상 여부 판단에 의해 구성된 실행 플랜인 DB 연산 그래프로부터, 병렬 처리에 필요한 연산 노드간 기본 의존관계 정보를 구성한다(S505). The JIT query execution unit 240 extracts, from a DB operation graph that is an execution plan configured by a query statement parsing of a query statement parser, a query optimization of a query optimization unit, and a JIT object selection by a JIT object selection unit, And configures dependency relationship information (S505).

DB 연산 그래프에 JIT 컴파일이 필요한 부분이 있는지 확인하여(S510), JIT 컴파일할 부분이 있으면 JIT 병렬성 관리부(261)는 해당 DB 연산 서브그래프에 대해 JIT 기반 병렬 처리를 위한 연산간 확장 의존 관계 정보를 구성한다(S515). The JIT parallelism management unit 261 checks whether there is a portion required for JIT compilation in the DB operation graph (S510), and if there is a portion to be JIT compiled, (S515).

연산간 확장 의존 관계 정보 구성은 최적화 규칙, 연산 그래프의 병렬 처리 정보 등을 고려한 컴파일 단위 및 함수화할 대상이 결정된다.The composition of the extension dependency information among the operations is determined by the compilation unit considering the optimization rules, the parallel processing information of the operation graph, and the object to be functionalized.

JIT 컴파일할 DB 연산 서브그래프에 대한 중간 표현 재활용이 가능한지 여부를 확인하고(S520), 재활용이 불가한 경우, JIT 중간 표현 관리부(251)는 연산간 확장 의존관계 정보와 DB 연산 서브그래프 정보로부터 IR 기반 서브 실행 플랜을 구성하고, 필요하면 JIT 최적화 실행부(262)에 의한 최적화가 실시된다(S525).The JIT intermediate representation management unit 251 determines whether or not the intermediate representation recycling of the DB operation subgraph to be JIT-compiled is possible (S520). If the recycling is not possible, the JIT intermediate representation management unit 251 extracts IR Based sub execution plan, and optimization is performed by the JIT optimization execution unit 262 if necessary (S525).

IR 기반 서브 실행 플랜은 동일한 실행 플랜에 대해서는 재활용이 가능하다. 따라서, 관리 정책에 따라 질의가 수행된 후에도 저장 관리되어 재활용되는 것이 가능하다.The IR-based sub-execution plan can be recycled for the same execution plan. Therefore, it is possible to store and manage the query even after the query is executed according to the management policy.

이어서, JIT 질의 실행부(240)는 스레드 배정 등 병렬 처리 환경을 구성하고 DB 연산 그래프와 연산간 확장 의존관계 정보를 기반으로 병렬 처리 스케줄링을 시작한다(S530). Then, the JIT query execution unit 240 configures a parallel processing environment such as a thread allocation and starts parallel processing scheduling based on the DB operation graph and the operation-extended extension dependency information (S530).

현재 스케줄링 할 대상이 JIT 컴파일 대상인지 여부를 확인하고(S535), JIT 컴파일 대상에 포함된 경우, 컴파일이 필요한지 확인하여(S540), 동적 컴파일이 필요한 경우 동적 최적화 및 컴파일을 실시한다(S545). 이어서, JIT 질의 실행부(240)는 컴파일드 실행 코드 내 함수포인터를 실행한다(S550). If the target to be scheduled is a JIT compilation target (S535), if it is included in the JIT compilation target, it is checked whether compilation is necessary (S540). If dynamic compilation is necessary, dynamic optimization and compilation are performed (S545). Then, the JIT query execution unit 240 executes the function pointer in the compiled execution code (S550).

S535단계에서 스케줄링할 대상이 JIT 컴파일 대상이 아닌 것으로 확인되면, 인터프리터를 실행하여 처리한다(S555). If it is determined in step S535 that the object to be scheduled is not a JIT compilation target, the interpreter is executed and processed (S555).

이어서, DB 연산 그래프의 모든 노드 처리가 완료되었는지 여부를 확인하고(S560), 완료되지 않은 경우 S530 단계로 회귀하고, 완료된 경우 질의 처리를 종료한다. Then, it is checked whether or not all node processing of the DB operation graph is completed (S560). If not completed, the flow returns to step S530. If completed, the query processing is terminated.

본 발명의 실시예에 따르면, 컴파일드 실행 코드는 질의 수행 시 마다 동적 최적화가 필요한 경우에는 재활용이 불가하다. According to the embodiment of the present invention, the compiled executable code can not be recycled when dynamic optimization is required every time a query is executed.

하지만, 동적 상황이 변경되지 않은 경우에는 실행 코드의 재활용이 가능하므로, 컴파일드 실행 코드는 관리 정책에 따라 관리되어 재활용될 수 있다. However, if the dynamic situation is not changed, the executable code can be recycled, so that the compiled executable code can be managed and reused according to the management policy.

본 발명의 실시예에 따르면, IR 기반 서브 실행 플랜 및 컴파일드 실행 코드는 필요에 따라 저장 관리되며, 이후 발생하는 질의 처리에 재활용이 가능한지 여부 확인에 따라 재활용될 수 있다. According to the embodiment of the present invention, the IR-based sub-execution plan and the compiled executable code are stored and managed as needed, and can be recycled according to confirmation as to whether recycling is possible in the query processing that occurs thereafter.

IR 기반 실행 플랜만 재활용이 가능할 수도 있고, 컴파일드 실행 코드까지 재활용이 가능할 수도 있다.Only IR-based execution plans can be recycled, and compiled executable code can be recycled.

JIT 컴파일이 필요한 부분은 실행 플랜을 구성하는 DB 연산 그래프의 일부분씩 여러 부분일 수 있다. The part where JIT compilation is necessary can be several parts by a part of the DB operation graph constituting the execution plan.

본 발명의 실시예에 따르면, 적용할 최적화 방법에 따라 각 JIT 컴파일 대상별로 별도로 컴파일드 실행 코드들을 구성해도 되고, 부분적으로 통합하여 구성하여도 된다.According to the embodiment of the present invention, the compiled executable codes may be separately configured for each JIT compilation object according to the optimization method to be applied, or may be partially integrated.

전술한 바와 같이, 본 발명의 실시예에 따르면 외부 병렬 처리 환경에 의해 변화되는 부분을 연산간 확장 의존관계 정보로 별도 구성한다.As described above, according to the embodiment of the present invention, the portion changed by the external parallel processing environment is separately configured as the inter-operation expansion dependency information.

또한, 인터프리터 코드와 컴파일드 실행 코드에 의한 DB 연산을 연산간 확장 의존관계 정보에 기반하여 병렬 처리를 위한 통합 제어가 가능하며, IR 기반 실행 플랜 또는 컴파일드 실행 코드의 재활용이 용이한 효과가 있다. In addition, it is possible to perform integrated control for parallel processing based on the inter-application code and the DB operation by the compiled executable code based on the extended dependency information, and it is easy to recycle the IR-based execution plan or the compiled executable code .

또한, IR 기반 서브 실행 플랜 구성 시 최적화 방법, 병렬 처리 제어 단위 등을 고려하여 컴파일 단위를 결정하고 함수화함으로써, 최적의 병렬 처리가 가능하도록 JIT 컴파일드 실행 코드를 구성하는 것이 가능하다.In addition, it is possible to construct a JIT compiled executable code so that optimal parallel processing can be performed by determining compilation unit and functioning in consideration of an optimization method and a parallel processing control unit in IR-based sub execution plan configuration.

이제까지 본 발명의 실시예들을 중심으로 살펴보았다. 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다. The embodiments of the present invention have been described above. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the disclosed embodiments should be considered in an illustrative rather than a restrictive sense. The scope of the present invention is defined by the appended claims rather than by the foregoing description, and all differences within the scope of equivalents thereof should be construed as being included in the present invention.

100: 데이터 저장 시스템 200: 질의 처리 시스템
210: 질의문 파서 220: 질의 최적화부
230: JIT 대상 선정부 240: JIT 질의 실행부
241: DB 연산 그래프 242: 연산간 의존관계
243: 병렬처리 스케줄러 244: 워커
244a: 인터프리터 기반 워커
244b: JIT 컴파일드 실행 코드 기반 워커
250: JIT 실행플랜 생성부 251: JIT 중간 표현 관리부
252: JIT 실행 코드 생성부 260: JIT 실행플랜 최적화부
261: JIT 병렬성 관리부 262: JIT 최적화 실행부
401: DB 연산 그래프 기반 실행 플랜
406: 연산간 기본 의존 관계 407: 연산간 확장 의존 관계
408: IR 기반 서브 실행 플랜 409: JIT 컴파일드 실행 코드
100: data storage system 200: query processing system
210: query statement parser 220: query optimizer
230: JIT object selection unit 240: JIT query execution unit
241: DB operation graph 242: dependency between operations
243: Parallel Processing Scheduler 244: Walker
244a: Interpreter-based walker
244b: JIT compiled executable code-based walker
250: JIT execution plan generation unit 251: JIT intermediate representation management unit
252: JIT execution code generation unit 260: JIT execution plan optimization unit
261: JIT parallelism management unit 262: JIT optimization execution unit
401: DB operation graph based execution plan
406: Basic dependency relationship between operations 407: Extended dependency between operations
408: IR-based sub execution plan 409: JIT compiled executable code

Claims (12)

DB 연산 그래프와 연산간 의존관계 정보를 구성하고, 수행 업무를 분배하는 병렬처리 스케줄러; 및
DB 연산을 위한JIT 컴파일드 실행코드와 인터프리터 코드를 포함하고, 질의 처리를 수행하는 워커들
을 포함하는 JIT 컴파일 기반 병렬 질의 처리 시스템.
A parallel processing scheduler for constructing DB operation graph and dependency information between operations and distributing tasks; And
JIT compilation for DB operations Include execution code and interpreter code, and walkers performing query processing
Based parallel query processing system.
제1항에 있어서,
상기 연산간 의존관계 정보는 병렬 처리에 필요한 연산간의 수행 순서를 결정하는 기본 의존관계 정보 외JIT 컴파일이 필요한 연산에 대해 호출 함수 정보가 추가된 확장 의존관계 정보인 것
을 특징으로 하는 JIT 컴파일 기반 병렬 질의 처리 시스템.
The method according to claim 1,
The inter-dependency relationship information is extension dependency information to which call function information is added for operations requiring JIT compilation other than basic dependency information for determining the execution order between operations required for parallel processing
JIT compilation based parallel query processing system.
제1항에 있어서,
상기 병렬 처리 스케줄러는 상기 연산간 의존관계 정보를 이용하여JIT 컴파일 대상이 아닌 연산은 상기 인터프리터 코드와 상기 DB 연산 그래프의 수행 범위를 상기 질의 처리를 수행하는 워커에 전달하고,
JIT 컴파일 대상 연산은 상기JIT 컴파일드 실행 코드 내의 호출 함수 포인터를 상기 질의 처리를 수행하는 워커에 전달하는 것
을 특징으로 하는 JIT 컴파일 기반 병렬 질의 처리 시스템.
The method according to claim 1,
Wherein the parallel processing scheduler transmits the interpreter code and the execution range of the DB operation graph to the worker performing the query processing using the inter-operation dependency information,
The JIT compilation target operation is to pass the calling function pointer in the JIT compiled executable code to the worker performing the query processing
JIT compilation based parallel query processing system.
DB 연산 그래프 중 JIT 컴파일 대상이 되는 서브 그래프 정보와 연산간 기본 의존관계 정보를 수신하여 연산간 확장 의존관계 정보를 구성하고 IR 기반 서브 실행 플랜에 대한 최적화를 수행하는 JIT 실행 플랜 최적화부;
상기 서브 그래프 정보 및 연산간 확장 의존 관계 정보를 기반으로 병렬 처리를 위한 IR 기반 서브 실행 플랜을 구성하고, 상기 IR 기반 서브 실행 플랜을 컴파일하여 컴파일드 실행 코드를 생성하는 JIT 실행 플랜 생성부
상기JIT 실행 플랜 최적화부와 상기 JIT 실행 플랜 생성부의 수행 제어를 추가로 수행하는 JIT 질의 실행부
를 포함하는 JIT 컴파일드 실행 코드 생성 시스템.
A JIT execution plan optimizing unit for receiving subgraph information and basic dependency information between JIT compilation graphs in the DB operation graph to configure inter-operation extended dependency information and performing optimization for an IR based sub execution plan;
An IR based sub execution plan for parallel processing based on the subgraph information and interworking extended dependency information, a JIT execution plan generating unit for generating a compiled execution code by compiling the IR based sub execution plan,
The JIT execution plan optimization unit and the JIT execution plan generation unit,
A JIT compiled executable code generation system.
제4항에 있어서,
상기 JIT 실행 플랜 최적화부는 IR 기반 서브 실행 플랜 구성 방법 및 최적화 규칙 등을 고려하여 호출 함수 정보를 포함하는 상기 연산간 확장 의존관계 정보를 구성하는 것
을 특징으로 하는 JIT 컴파일드 실행 코드 생성 시스템.
5. The method of claim 4,
The JIT execution plan optimizing unit may be configured to construct the inter-extension extended dependency information including the call function information in consideration of the IR-based sub-execution plan construction method and the optimization rule
JIT compiled executable code generation system.
제4항에 있어서,
상기 JIT 실행 플랜 생성부는 동적 컴파일 단위 및 외부 호출 단위를 고려하여 상기 IR 기반 서브 실행 플랜을 구성하는 것
을 특징으로 하는 JIT 컴파일드 실행 코드 생성 시스템.
5. The method of claim 4,
The JIT execution plan generator may be configured to configure the IR-based sub execution plan in consideration of a dynamic compilation unit and an external call unit
JIT compiled executable code generation system.
제4항에 있어서,
상기 IR 기반 서브 실행 플랜 및 컴파일드 실행 코드는 관리 정책에 따라 관리되어, 재활용되는 것
을 특징으로 하는 JIT 컴파일드 실행 코드 생성 시스템.
5. The method of claim 4,
The IR-based sub-execution plan and the compiled executable code are managed according to the management policy and are to be recycled
JIT compiled executable code generation system.
(a) DB 연산 그래프로부터 병렬 처리를 위한 연산간 의존 관계 정보를 구성하는 단계;
(b) JIT 컴파일 대상이 되는 DB 연산 서브 그래프에 대해 연산간 확장 의존관계 정보를 구성하는 단계;
(c) 상기 DB 연산 서브 그래프와 연산간 확장 의존관계 정보를 이용하여 IR 기반 서브 실행 플랜을 구성하는 단계;
(d) 상기 IR 기반 서브 실행 플랜을 이용하여 컴파일드 실행코드를 구성하는 단계
(e) 상기 연산간 확장 의존관계 정보를 기반으로 병렬 처리 스케줄링을 시작하는 단계;
(f) 상기 (e) 단계에서의 스케줄링 대상이 JIT 컴파일 대상이 아닌 경우, 인터프리터를 실행하는 단계; 및
(g) 상기 (e) 단계에서의 스케줄링 대상이 JIT 컴파일 대상인 경우, 컴파일드 실행 코드 내의 함수포인터를 실행하는 단계
를 포함하는 JIT 컴파일 기반 병렬 질의 처리 방법.
(a) constructing dependency information between transactions for parallel processing from a DB operation graph;
(b) constructing inter-annual extended dependency information on the DB operation subgraph to be JIT compiled;
(c) constructing an IR-based sub-execution plan using the DB operation subgraph and inter-operation extension dependency information;
(d) constructing a compiled executable code using the IR-based subexecution plan
(e) starting parallel processing scheduling based on the interworking extended dependency information;
(f) executing an interpreter when the scheduling target in the step (e) is not a JIT compilation target; And
(g) when the scheduling target in the step (e) is a JIT compilation target, executing a function pointer in the compiled executable code
Based parallel query processing method.
제8항에 있어서,
상기 (b) 단계는 IR 기반 서브 실행 플랜 구성 방법 및 최적화 규칙 등을 고려하여 호출 함수 정보를 포함하는 연산간 확장 의존관계 정보를 구성하는 것
을 특징으로 하는 JIT 컴파일 기반 병렬 질의 처리 방법.
9. The method of claim 8,
The step (b) includes constructing inter-call extension dependency information including call function information in consideration of IR-based sub-execution plan configuration method and optimization rule
A parallel query processing method based on JIT compilation.
제8항에 있어서,
상기 (c) 단계는 동적 컴파일 단위 및 외부 호출 단위를 고려하여 상기 IR 기반 서브 실행 플랜을 구성하는 것
을 특징으로 하는 JIT 컴파일 기반 병렬 질의 처리 방법.
9. The method of claim 8,
The step (c) includes configuring the IR-based sub-execution plan in consideration of the dynamic compilation unit and the external call unit
A parallel query processing method based on JIT compilation.
제8항에 있어서,
상기 (c) 단계 이전에서, 상기 JIT 컴파일 대상이 되는 DB 연산 서브 그래프에 대한 중간 표현 재활용이 가능한지 여부를 확인하는 단계
를 더 포함하는 JIT 컴파일 기반 병렬 질의 처리 방법.
9. The method of claim 8,
Before the step (c), it is checked whether or not the intermediate expression recycling for the DB operation subgraph to be the JIT compilation target is possible
A JIT compilation based parallel query processing method.
제8항에 있어서,
상기 (d) 단계 이전에서, 상기 컴파일드 실행 코드 재활용이 가능한지 여부를 확인하는 단계
를 더 포함하는 JIT 컴파일 기반 병렬 질의 처리 방법.
9. The method of claim 8,
Before the step (d), it is checked whether or not the compiled executable code is recyclable
A JIT compilation based parallel query processing method.
KR1020180105438A 2017-09-13 2018-09-04 System and method for parallel query processing based on jit compilation KR20190030165A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/129,407 US20190079972A1 (en) 2017-09-13 2018-09-12 System and method for parallel query processing based on jit compilation

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020170117119 2017-09-13
KR20170117119 2017-09-13

Publications (1)

Publication Number Publication Date
KR20190030165A true KR20190030165A (en) 2019-03-21

Family

ID=66037034

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180105438A KR20190030165A (en) 2017-09-13 2018-09-04 System and method for parallel query processing based on jit compilation

Country Status (1)

Country Link
KR (1) KR20190030165A (en)

Similar Documents

Publication Publication Date Title
Casini et al. Partitioned fixed-priority scheduling of parallel tasks without preemptions
Bjørk et al. User-defined schedulers for real-time concurrent objects
CN109614170B (en) Controlling tasks performed by a computing system
US20130139164A1 (en) Business Process Optimization
CN107943457B (en) Workflow modeling method and system for business object
US20130138473A1 (en) Business Process Optimization
US20100229161A1 (en) Compile method and compiler
US11934874B2 (en) Resource optimization for serverless query processing
Albert et al. COSTABS: a cost and termination analyzer for ABS
US20190079972A1 (en) System and method for parallel query processing based on jit compilation
JP2004220583A (en) Method and system for executing global processor resource assignment in assembler
CN109408216A (en) Task creating method, device, equipment and storage medium
CN112748993A (en) Task execution method and device, storage medium and electronic equipment
Kwak et al. Symbolic schedulability analysis of real-time systems
Fabry et al. A taxonomy of domain-specific aspect languages
Johnsen et al. Dynamic resource reallocation between deployment components
CN109445929A (en) A kind of method and system of scheduler task
WO2012051844A1 (en) Intelligent network platform, method for executing services and method for analyzing service abnormity
EP3432138B1 (en) A computer-implemented method and system for comparing the results on a plurality of target machines of modification of a region of original code
Nobakht et al. Programming and deployment of active objects with application-level scheduling
KR20190030165A (en) System and method for parallel query processing based on jit compilation
CN105653334B (en) MIS system rapid development framework based on SAAS mode
Voronov et al. An optimal semi-partitioned scheduler assuming arbitrary affinity masks
EP4204960A1 (en) Thread-local return structure for asynchronous state machine
Prokesch et al. Towards automated generation of time-predictable code