WO2020105748A1 - 분산형 데이터베이스상의 인덱스 병합을 활용한 질의 최적화 방법 - Google Patents

분산형 데이터베이스상의 인덱스 병합을 활용한 질의 최적화 방법

Info

Publication number
WO2020105748A1
WO2020105748A1 PCT/KR2018/014344 KR2018014344W WO2020105748A1 WO 2020105748 A1 WO2020105748 A1 WO 2020105748A1 KR 2018014344 W KR2018014344 W KR 2018014344W WO 2020105748 A1 WO2020105748 A1 WO 2020105748A1
Authority
WO
WIPO (PCT)
Prior art keywords
query
trees
ascending order
optimization method
query optimization
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/KR2018/014344
Other languages
English (en)
French (fr)
Inventor
안재훈
손재기
김시원
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Korea Electronics Technology Institute
Original Assignee
Korea Electronics Technology Institute
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 Korea Electronics Technology Institute filed Critical Korea Electronics Technology Institute
Publication of WO2020105748A1 publication Critical patent/WO2020105748A1/ko
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24534Query rewriting; Transformation
    • G06F16/24542Plan optimisation
    • G06F16/24545Selectivity estimation or determination
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24534Query rewriting; Transformation
    • G06F16/24542Plan optimisation
    • G06F16/24544Join order optimisation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24534Query rewriting; Transformation
    • G06F16/24547Optimisations to support specific applications; Extensibility of optimisers
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Definitions

  • the present invention relates to a query optimization method for improving processing performance by providing an optimized query to a DBMS based on a distributed environment built on a number of computers connected by a network.
  • the existing processing method is to scan the entire table and access rows sequentially from the first block of the table to extract rows that satisfy the condition.
  • the index scan method performed in the existing DBMS structures the index into a tree.
  • the B + tree structured index consists internally of the Root, Intermediate, and Leaf levels, and the actual data page is at the Leaf level.
  • the present invention has been devised to solve the above problems, and the object of the present invention is to generate an index, which is an aggregate of all field data for a column specified in the query condition section and a unique row number for accessing the database.
  • the approach is to provide a method to improve data processing performance through optimized queries.
  • the query optimization method includes parsing a query in units of syntax to extract a condition attribute; Generating B + Trees of Row Num pairs corresponding to field values of the corresponding column using the extracted condition Attribute; Sorting each generated B + Tree in ascending order based on each field value; In the B + Trees arranged in ascending order, generating only the corresponding rows as a query.
  • the extraction step may be to parse the query in units of Select, From, and Where.
  • the extraction step may be to extract the attribute of the table specified in the Where clause as a conditional attribute.
  • sorting may be performed in ascending order based on Row Num.
  • the generating step may be scanning while comparing the indexes of B + Trees for pairs within a range that satisfies a condition in B + Trees arranged in ascending order.
  • the generating step may be scanning Row Num with a search priority on a smaller field value.
  • the generating step may be to generate only the rows having the row num that match each other in each B + Tree as a query.
  • a query optimization system includes a communication unit communicating with a DBMS; Parse the query in units of syntax to extract the condition attribute, and use the extracted condition attribute to generate B + Trees consisting of the row Num pair corresponding to the field value of the column, and each generated B + Tree field. It includes; a processor that sorts in ascending order based on the value and generates only the corresponding rows in B + Trees sorted in ascending order.
  • 1 and 2 are diagrams provided to explain the method of processing the Select statement in the DBMS
  • FIG. 3 is a view illustrating a database table in which Row Num is generated
  • FIG. 9 is a block diagram of a query optimization system according to another embodiment of the present invention.
  • a query optimization technique using index merging that can show improved processing performance at a minimum cost when querying data is proposed.
  • the method according to an embodiment of the present invention includes a technique for optimizing a query with high efficiency through techniques of user query decomposition, data qualification, overall optimization, and partial optimization, which are representative procedures of query optimization in a distributed DBMS.
  • the number of accesses is less than the method of extracting rows satisfying the conditions given in the condition clause while accessing the entire table, resulting in higher efficiency.
  • an index is structured in a two-dimensional array, not a tree structure, to minimize complex operations in creating an index when a table is changed due to insertion and deletion.
  • Select (objective attribute) from (table name) is the basic syntax, and a few additional syntaxes are added to the conditional search according to the syntax.
  • the operation of processing the existing Select statement inside the DBMS is a 'Full Table Scan' method, as shown in FIGS. 1 and 2.
  • Row Num is a unique identifier for quickly finding field values and data in a column. This is automatically generated when data is inserted into the database table, as shown in FIG. 3, and is assigned to different values for each table.
  • the unique value stored is the address of the pointer where each row is stored or the order in which it is stored.
  • Each DBMS has a slightly different name and is used as Row ID or Row Num.
  • the optimization method according to an embodiment of the present invention is a technique for optimizing a given Select statement based on a non-sequential block access method by first processing it at a programming level.
  • the block of the database table is sequentially searched and the matched result is extracted.
  • the non-sequential block access method is a 'rule-based optimization technique' that simplifies the rules to be performed in the DBMS by allowing only values that meet the required conditions to be accessed.
  • the query is parsed in units of Select, From, and Where syntax to extract the attribute of the table specified in the Where clause (FIRST_NAME, SALARY).
  • each generated B + Tree is sorted in ascending order based on each field value. If the field values are the same, sort in ascending order based on Row Num (B + Tree structure is not important, so it is specified as a conceptual table).
  • the index of B + Tree is compared from pairs within a range that satisfies a condition in an ascending B + Tree to scan a row Num with a search priority at a smaller value. Scan all data of B + Tree based on each row num.
  • the search method through the index is somewhat disadvantageous when the amount of data is less than that of the full table scan method, but it is advantageous in querying a large amount of data.
  • FIG. 9 is a block diagram of a query optimization system according to another embodiment of the present invention.
  • the query optimization system according to an embodiment of the present invention may be implemented as a computing system including a communication unit 110, a processor 120, and a storage unit 130, as illustrated in FIG. 9.
  • the communication unit 110 is a communication interface for communicating with the distributed DBMS, and the processor 120 optimizes the query according to the above-described method and requests the distributed DBMS through the communication unit 110.
  • the storage unit 130 provides a storage space required for the processor 120 to operate.
  • an index which is an aggregate of all field data for a column specified in the query condition section and a unique row number for accessing the database, is created to access the database with minimal cost, and data processing performance through optimized query Improves.
  • the technical idea of the present invention can be applied to a computer-readable recording medium containing a computer program that performs functions of the apparatus and method according to the present embodiment. Further, the technical idea according to various embodiments of the present invention may be implemented in the form of computer-readable codes recorded on a computer-readable recording medium.
  • the computer-readable recording medium can be any data storage device that can be read by a computer and stores data.
  • the computer-readable recording medium can be a ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical disk, hard disk drive, and the like.
  • computer-readable codes or programs stored on a computer-readable recording medium may be transmitted through a network connected between computers.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Operations Research (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

질의 조건 절에 명시된 열에 대한 모든 필드 데이터와 데이터베이스에 접근하기 위한 고유 행 번호들의 집합체인 인덱스를 생성해 데이터베이스에 최소한의 비용으로 접근하며, 최적화된 질의를 통해 데이터 처리 성능을 향상시키는 방법이 제공된다. 본 발명의 실시예에 따른 질의 최적화 방법은 질의를 구문 단위로 파싱하여, 조건 Attribute를 추출하는 단계; 추출된 조건 Attribute를 이용하여, 해당 열의 필드 값과 대응하는 Row Num 쌍으로 이루어져 있는 B+Tree들을 생성하는 단계; 생성된 각각의 B+Tree들을, 각 필드 값을 기준으로 오름차순으로 정렬하는 단계; 오름차순으로 정렬된 B+ Tree들에서, 해당되는 행들만을 질의로 생성하는 단계;를 포함한다. 이에 의해, 테이블의 고유 행 번호를 접근 매개체로 사용함으로써 불필요한 접근을 줄여 검색 성능을 높일 수 있고, 인덱스가 내부적으로 정렬되어 있어 조건 절 열값을 추출하는데 있어 용이하며, 변경된 테이블에 대해 불필요한 연산을 줄여 최소한의 시간으로 인덱스를 생성할 수 있다.

Description

분산형 데이터베이스상의 인덱스 병합을 활용한 질의 최적화 방법
본 발명은 네트워크로 연결된 다수의 컴퓨터를 바탕으로 구축되어 있는 분산 환경 기반의 DBMS에 최적화 된 질의를 제공하여 처리 성능을 향상시키기 위한 질의 최적화 방법에 관한 것이다.
SELECT 질의를 통해 데이터 조회를 수행함에 있어 기존의 처리 방식은 전체 테이블을 스캔하는 방법이며 테이블의 첫 번째 블록부터 차례대로 접근하여 조건을 만족하는 행을 추출하는 방식이다.
이는 한번의 I/O 요청으로 여러 블록을 읽어 전체 테이블을 모두 스캔할 때까지 수행된다. 따라서 대용량의 데이터가 저장된 DBMS일 경우 작업의 우선순위가 테이블의 모든 블록에 접근하는 데 있어 질의 수행 시간이 기하급수적으로 길어지는 문제가 있다.
또한 기존의 DBMS 내에서 수행되는 인덱스 스캔 방식은 인덱스를 트리로 구조화한다. B+트리로 구조화된 인덱스는 내부적으로 Root, Intermediate, Leaf 레벨로 구성되어 있고 실제 데이터 페이지는 Leaf 레벨에 존재한다.
데이터의 삽입 및 삭제 등의 연산으로 테이블이 변경되었을 때, 이에 대한 인덱스를 다시 만들기 위해 복잡한 연산이 수행된다. 데이터가 삽입된 경우에는 Root를 따라 다시 Leaf 레벨에 배치되어야 하고, 데이터가 삭제된 경우에는 해당 데이터를 트리에서 일일이 찾아 삭제하고 인덱스의 노드를 재배열 하여야 하는 단점이 있다. 이처럼 복잡한 연산이 수행될 경우 인덱스 생성 시간이 길어져 비효율적이다.
본 발명은 상기와 같은 문제점을 해결하기 위하여 안출된 것으로서, 본 발명의 목적은, 질의 조건 절에 명시된 열에 대한 모든 필드 데이터와 데이터베이스에 접근하기 위한 고유 행 번호들의 집합체인 인덱스를 생성해 데이터베이스에 최소한의 비용으로 접근하며, 최적화된 질의를 통해 데이터 처리 성능을 향상시키는 방법을 제공함에 있다.
상기 목적을 달성하기 위한 본 발명의 일 실시예에 따른, 질의 최적화 방법은 질의를 구문 단위로 파싱하여, 조건 Attribute를 추출하는 단계; 추출된 조건 Attribute를 이용하여, 해당 열의 필드 값과 대응하는 Row Num 쌍으로 이루어져 있는 B+Tree들을 생성하는 단계; 생성된 각각의 B+Tree들을, 각 필드 값을 기준으로 오름차순으로 정렬하는 단계; 오름차순으로 정렬된 B+ Tree들에서, 해당되는 행들만을 질의로 생성하는 단계;를 포함한다.
추출 단계는, 질의를 Select, From, Where 구문 단위로 파싱하는 것일 수 있다.
추출 단계는, Where 절에 명시된 테이블의 Attribute를 조건 Attribute로 추출하는 것일 수 있다.
정렬 단계는, 필드 값이 같으면, Row Num을 기준으로 오름차순 정렬하는 것일 수 있다.
생성 단계는, 오름차순으로 정렬된 B+ Tree들에서 조건에 부합하는 범위 내의 쌍들에 대해, B+Tree들의 인덱스를 비교하면서 스캔하는 것일 수 있다.
생성 단계는, 더 작은 필드 값에 탐색 우선순위를 두고 Row Num을 스캔하는 것일 수 있다.
생성 단계는, 각 B+Tree들에서 서로 매치되는 Row Num을 지닌 행들만을 질의로 생성하는 것일 수 있다.
한편, 본 발명의 다른 실시예에 따른, 질의 최적화 시스템은 DBMS와 통신하는 통신부; 질의를 구문 단위로 파싱하여 조건 Attribute를 추출하고, 추출된 조건 Attribute를 이용하여 해당 열의 필드 값과 대응하는 Row Num 쌍으로 이루어져 있는 B+Tree들을 생성하며, 생성된 각각의 B+Tree들을 각 필드 값을 기준으로 오름차순으로 정렬하고, 오름차순으로 정렬된 B+ Tree들에서 해당되는 행들만을 질의로 생성하는 프로세서;를 포함한다.
이상 설명한 바와 같이, 본 발명의 실시예들에 따르면, 테이블의 고유 행 번호를 접근 매개체로 사용함으로써 불필요한 접근을 줄여 검색 성능을 높일 수 있고, 인덱스가 내부적으로 정렬되어 있어 조건 절 열값을 추출하는데 있어 용이하며, 변경된 테이블에 대해 불필요한 연산을 줄여 최소한의 시간으로 인덱스를 생성할 수 있다.
도 1 및 도 2는, Select 문을 DBMS의 내부에서 처리하는 방식의 설명에 제공되는 도면들,
도 3은 Row Num이 생성된 데이터베이스 테이블을 예시한 도면,
도 4 내지 도 8은, 본 발명의 실시예에 따른 최적화 방법의 설명에 제공되는 도면들, 그리고,
도 9는 본 발명의 다른 실시예에 따른 질의 최적화 시스템의 블럭도이다.
이하에서는 도면을 참조하여 본 발명을 보다 상세하게 설명한다.
최근 정보 기술의 발전 및 다양한 분야의 융합에 따른 데이터 종류의 다양화, 단 시간 내에 폭발적으로 발생되는 빅 데이터의 처리에 따른 대량의 데이터 저장 등의 이슈가 대두되고 있고, 이로 인해 기존 DBMS에 비해 대량의 저장된 데이터를 처리하기 위한 고속화 및 성능 향상이 요구되고 있다.
그러나 DBMS 자체의 고속화 및 성능 향상을 고려하기에 앞서 질의를 실용적이고 민첩한 질의로 최적화하여 처리시킴으로써 성능 향상을 노려 볼 수 있다. 즉 DBMS에 대량으로 저장된 데이터에 대해 동등한 실행 계획 중 가장 적은 비용을 갖는 질의로 변환하여 시간대비 효율적으로 처리가 가능한 것이다.
본 발명의 실시예에서는 이러한 질의 최적화 기술 중 데이터를 조회 시에 최소한의 비용으로 향상된 처리 성능을 보일 수 있는 인덱스 병합을 활용한 질의 최적화 기술을 제시한다.
본 발명의 실시예에 따른 방법은, 분산형 DBMS에서의 질의 최적화의 대표적 절차인 사용자의 질의 분해, 데이터 한정화, 전체 최적화, 부분 최적화의 기술을 통해 고효율의 쿼리로 최적화 시키는 기술을 포함하고 있다.
본 발명의 실시예에 따른 질의 최적화 방법에서는, 다른 규칙 기반 질의 최적화 방법에 비해 고유 행 번호를 이용해 액세스하기 때문에 다른 정보를 참조하지 않고 테이블에 바로 접근할 수 있다.
또한, 본 발명의 실시예에 따른 질의 최적화 방법에서는, 전체 테이블에 접근하면서 조건 절에 주어진 조건을 만족하는 행을 추출하는 방식에 비해 접근 횟수가 적어 더 높은 효율을 낼 수 있다.
그리고, 본 발명의 실시예에 따른 질의 최적화 방법에서는, 트리 구조가 아닌 2차원 배열로 인덱스를 구조화해서 삽입 및 삭제로 인해 테이블이 변경되었을 때 인덱스를 생성하는데 있어서 복잡한 연산을 최소화한다.
이하에서, 본 발명의 실시예에 따른 질의 최적화 방법과 연관된 질의 및 Index에 대해 설명한다.
1. Select Query : SQL문의 가장 기본이 되는 구문.
Select문을 사용하여 특정 행을 검색하거나 특정 방법으로 데이터를 검색 할 수 있다.
Select (목적 에트리뷰트) from (테이블 이름) 이 기본적인 구문이며, 여기에 추가적으로 몇몇 구문이 더 붙음으로써 그 구문에 따른 조건검색이 가능하다.
ex) Where 절을 사용한 탐색 조건 지정 : 검색, 갱신 할 행의 조건을 지정한다.
Select *from 상품명 Where 값 >50000
2. 기존의 Select 문을 실행시의 동작의 예.
기존의 Select 문을 DBMS의 내부에서 처리하는 동작은 'Full Table Scan' 방식이며 이는 도 1 과 도 2에 도시된 바와 같다.
Full Table Scan 방식은 도 1의 Select문의 Where 절의 First_Name = 'Choi' 및 Salary > 20000 의 행을 탐색하기 위해, 도 2에 도시된 바와 같이, 모든 블록을 순차적으로 엑세스하게 되며, 조건에 맞지 않는 경우 다음 블록으로 넘어가는 순서로 진행된다.
이는 데이터의 양이 적은 경우 오히려 빠른 결과를 반환하기도 하지만, 데이터의 양이 많은 테이블을 조회 할 시에 모든 블록을 탐색함에 따른 불필요한 접근이 발생하며, 비효율적이다.
3. Row Num
Row Num은 열의 필드 값과 데이터를 빠르게 찾기 위한 고유 식별자이다. 이는, 도 3에 도시된 바와 같이, 데이터베이스 테이블에 데이터 삽입 시 자동으로 생성되며 각 테이블마다 서로 다른 값으로 지정된다.
이는, DBMS가 자체적으로 관리하는 Attribute로써 Attribute 조회 시 사용자에게 노출되어있지 않고 숨겨져 있다. 저장되는 고유 값은 각 행이 저장되어 있는 포인터 주소 혹은 저장된 순서이다. DBMS마다 명칭이 조금은 다르며 Row ID 혹은 Row Num으로 사용된다.
본 발명의 실시예에 따른 최적화 방법은, 비순차적 블록 엑세스 방식을 기반으로 주어진 Select 문에 대해 먼저 프로그래밍 차원에서 먼저 처리함으로써 최적화 처리하는 기법이다.
일반적으로 Select문 질의는 실행 시 DBMS에서 해당 조건에 따른 Select 문의 결과를 얻어오기 위해 데이터베이스 테이블의 블록을 순차적으로 탐색하며 부합된 결과를 추출한다.
비순차적 블록 엑세스 방식은 Full Table Scan 방식과 달리, 요구되는 조건에 부합하는 값만을 엑세스하도록 함으로써 DBMS에서 수행되어야 할 규칙을 단순화 하는 '규칙 기반 최적화 기법' 이다.
도 4 내지 도 8은, 본 발명의 실시예에 따른 최적화 방법을 통해 Where절이 포함된 Select문의 결과를 반환받는 전체 절차를 설명한다.
도 4에 주어진 EMPLOYEES 테이블과 도 5에 제시된 예제 질의를 예시로 설명한다. 도면 상의 숫자는 서술한 순서와 일치한다.
1. SQL Parser
도 5에 표시된 바와 같이, 질의를 Select, From, Where 구문 단위로 파싱하여 Where 절에 명시된 테이블의 Attribute를 추출한다(FIRST_NAME, SALARY).
2. B+ Tree
추출된 조건 Attribute를 이용해 해당 열의 필드 값과 그에 대응하는 Row Num 쌍으로 이루어져 있는 B+Tree를 생성한다. 이 필드와 Row Num 쌍을 인덱스 라고 호칭한다.
3. 오름차순 정렬
도 6에 도시된 바와 같이, 생성된 각각의 B+Tree를 각 필드 값을 기준으로 오름차순으로 정렬한다. 만약 필드 값이 같다면 Row Num을 기준으로 오름차순 정렬한다(B+Tree의 구조는 중요하지 않으므로 개념적 테이블로써 명시하였다).
4. Scan B+Tree
도 8에 도시된 바와 같이, 오름차순으로 정렬된 B+ Tree에서 조건에 부합하는 범위 내의 쌍들로부터 B+Tree의 인덱스를 비교하여 더 작은 값에 탐색 우선순위를 두고 Row Num을 스캔한다. 각 Row Num을 기준으로 B+Tree의 모든 데이터를 스캔한다.
5. Access to database table
인덱스 비교 시 각 B+Tree에서 서로 매치되는 Row Num을 지닌 경우가 조건에서 구하고자 하는 행에 해당되는 경우이므로, 해당되는 행들만을 DBMS에 질의로 요청하여 테이블에 결과 테이블로 반환한다.
예제를 통하여, 테이블 내에 데이터의 수가 무수히 많아도 DBMS에 지정되어있는 고유 식별자인 Row Num을 통해 각 조건 내에 매칭시킴으로써, 훨씬 더 적은 테이블 행 접근 횟수를 통해 그 절차를 최소화 할 수 있다.
뿐만 아니라 데이터를 오름차순으로 정렬함으로써 조건에 맞는 데이터에 대해서만 탐색을 하여 불필요한 데이터에 대한 탐색을 제거함에 따라 DBMS에서의 연산 비용을 최소화 시킬 수 있다.
이와 같은 인덱스를 통한 탐색 방식은 Full table Scan 방식에 비해 데이터양이 적을 시에는 다소 불리하지만, 대용량의 데이터를 조회하는데 있어서 유리하다.
도 9는 본 발명의 다른 실시예에 따른 질의 최적화 시스템의 블럭도이다. 본 발명의 실시예에 따른 질의 최적화 시스템은, 도 9에 도시된 바와 같이, 통신부(110), 프로세서(120) 및 저장부(130)를 포함하는 컴퓨팅 시스템으로 구현가능하다.
통신부(110)는 분산형 DBMS와 통신하기 위한 통신 인터페이스이고, 프로세서(120)는 전술한 방법에 따라 질의를 최적화하여 통신부(110)를 통해 분산형 DBMS에 요청한다. 저장부(130)는 프로세서(120)가 동작함에 있어 필요한 저장공간을 제공한다.
지금까지, 분산형 데이터베이스상의 인덱스 병합을 활용한 질의 최적화 방법에 대해 바람지한 실시예를 들어 상세히 설명하였다.
본 발명의 실시예에서는, 질의 조건 절에 명시된 열에 대한 모든 필드 데이터와 데이터베이스에 접근하기 위한 고유 행 번호들의 집합체인 인덱스를 생성해 데이터베이스에 최소한의 비용으로 접근하며, 최적화된 질의를 통해 데이터 처리 성능을 향상시킨다.
본 발명의 실시예에서는, 테이블의 고유 행 번호를 접근 매개체로 사용함으로써 불필요한 접근을 줄여 검색 성능을 높이는데, 인덱스는 내부적으로 정렬되어 있어 조건 절 열값을 추출하는데 있어 용이하며, 변경된 테이블에 대해 불필요한 연산을 줄여 최소한의 시간으로 인덱스를 생성할 수 있다.
한편, 본 실시예에 따른 장치와 방법의 기능을 수행하게 하는 컴퓨터 프로그램을 수록한 컴퓨터로 읽을 수 있는 기록매체에도 본 발명의 기술적 사상이 적용될 수 있음은 물론이다. 또한, 본 발명의 다양한 실시예에 따른 기술적 사상은 컴퓨터로 읽을 수 있는 기록매체에 기록된 컴퓨터로 읽을 수 있는 코드 형태로 구현될 수도 있다. 컴퓨터로 읽을 수 있는 기록매체는 컴퓨터에 의해 읽을 수 있고 데이터를 저장할 수 있는 어떤 데이터 저장 장치이더라도 가능하다. 예를 들어, 컴퓨터로 읽을 수 있는 기록매체는 ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 광디스크, 하드 디스크 드라이브, 등이 될 수 있음은 물론이다. 또한, 컴퓨터로 읽을 수 있는 기록매체에 저장된 컴퓨터로 읽을 수 있는 코드 또는 프로그램은 컴퓨터간에 연결된 네트워크를 통해 전송될 수도 있다.
또한, 이상에서는 본 발명의 바람직한 실시예에 대하여 도시하고 설명하였지만, 본 발명은 상술한 특정의 실시예에 한정되지 아니하며, 청구범위에서 청구하는 본 발명의 요지를 벗어남이 없이 당해 발명이 속하는 기술분야에서 통상의 지식을 가진자에 의해 다양한 변형실시가 가능한 것은 물론이고, 이러한 변형실시들은 본 발명의 기술적 사상이나 전망으로부터 개별적으로 이해되어져서는 안될 것이다.

Claims (8)

  1. 질의를 구문 단위로 파싱하여, 조건 Attribute를 추출하는 단계;
    추출된 조건 Attribute를 이용하여, 해당 열의 필드 값과 대응하는 Row Num 쌍으로 이루어져 있는 B+Tree들을 생성하는 단계;
    생성된 각각의 B+Tree들을, 각 필드 값을 기준으로 오름차순으로 정렬하는 단계;
    오름차순으로 정렬된 B+ Tree들에서, 해당되는 행들만을 질의로 생성하는 단계;를 포함하는 것을 특징으로 하는 질의 최적화 방법.
  2. 청구항 1에 있어서,
    추출 단계는,
    질의를 Select, From, Where 구문 단위로 파싱하는 것을 특징으로 하는 질의 최적화 방법.
  3. 청구항 2에 있어서,
    추출 단계는,
    Where 절에 명시된 테이블의 Attribute를 조건 Attribute로 추출하는 것을 특징으로 하는 질의 최적화 방법.
  4. 청구항 1에 있어서,
    정렬 단계는,
    필드 값이 같으면, Row Num을 기준으로 오름차순 정렬하는 것을 특징으로 하는 질의 최적화 방법.
  5. 청구항 1에 있어서,
    생성 단계는,
    오름차순으로 정렬된 B+ Tree들에서 조건에 부합하는 범위 내의 쌍들에 대해, B+Tree들의 인덱스를 비교하면서 스캔하는 것을 특징으로 하는 질의 최적화 방법.
  6. 청구항 5에 있어서,
    생성 단계는,
    더 작은 필드 값에 탐색 우선순위를 두고 Row Num을 스캔하는 것을 특징으로 하는 질의 최적화 방법.
  7. 청구항 6에 있어서,
    생성 단계는,
    각 B+Tree들에서 서로 매치되는 Row Num을 지닌 행들만을 질의로 생성하는 것을 특징으로 하는 질의 최적화 방법.
  8. DBMS와 통신하는 통신부;
    질의를 구문 단위로 파싱하여 조건 Attribute를 추출하고, 추출된 조건 Attribute를 이용하여 해당 열의 필드 값과 대응하는 Row Num 쌍으로 이루어져 있는 B+Tree들을 생성하며, 생성된 각각의 B+Tree들을 각 필드 값을 기준으로 오름차순으로 정렬하고, 오름차순으로 정렬된 B+ Tree들에서 해당되는 행들만을 질의로 생성하는 프로세서;를 포함하는 것을 특징으로 하는 질의 최적화 시스템.
PCT/KR2018/014344 2018-11-21 2018-11-21 분산형 데이터베이스상의 인덱스 병합을 활용한 질의 최적화 방법 Ceased WO2020105748A1 (ko)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020180144301A KR102351846B1 (ko) 2018-11-21 2018-11-21 분산형 데이터베이스상의 인덱스 병합을 활용한 질의 최적화 방법
KR10-2018-0144301 2018-11-21

Publications (1)

Publication Number Publication Date
WO2020105748A1 true WO2020105748A1 (ko) 2020-05-28

Family

ID=70773079

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2018/014344 Ceased WO2020105748A1 (ko) 2018-11-21 2018-11-21 분산형 데이터베이스상의 인덱스 병합을 활용한 질의 최적화 방법

Country Status (2)

Country Link
KR (1) KR102351846B1 (ko)
WO (1) WO2020105748A1 (ko)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112559554A (zh) * 2020-12-24 2021-03-26 北京百家科技集团有限公司 一种查询语句优化方法及装置
CN114896458A (zh) * 2022-05-12 2022-08-12 河南创源生物技术有限公司 一种猪的基因库数据检索方法及系统、存储介质
CN115292315A (zh) * 2022-07-29 2022-11-04 广州市玄武无线科技股份有限公司 一种基于用户行为的数据库表字段索引建立方法及系统

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20260000357A (ko) * 2024-06-25 2026-01-02 네이버 주식회사 NoSQL 환경에서 피기백 방식을 활용하여 인덱스 데이터를 직접 조회하는 방법 및 시스템

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060135794A (ko) * 2004-02-26 2006-12-29 미디어 가이드, 인코포레이티드 방송 오디오 또는 비디오 프로그래밍 신호의 자동 검출 및식별 방법, 및 장치
KR20080046905A (ko) * 2006-11-23 2008-05-28 삼성전자주식회사 최적화된 인덱스 검색 방법 및 장치
US20100146003A1 (en) * 2008-12-10 2010-06-10 Unisys Corporation Method and system for building a B-tree
KR20110052301A (ko) * 2009-11-12 2011-05-18 고려대학교 산학협력단 무선 데이터 방송 스트림에서 위치 기반 상위­k질의 처리 방법
KR20140049326A (ko) * 2012-10-17 2014-04-25 주식회사 리얼타임테크 혼합 질의 처리를 위한 색인 생성 방법, 혼합 질의 처리 방법 및 색인 자료구조를 기록한 기록 매체

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060135794A (ko) * 2004-02-26 2006-12-29 미디어 가이드, 인코포레이티드 방송 오디오 또는 비디오 프로그래밍 신호의 자동 검출 및식별 방법, 및 장치
KR20080046905A (ko) * 2006-11-23 2008-05-28 삼성전자주식회사 최적화된 인덱스 검색 방법 및 장치
US20100146003A1 (en) * 2008-12-10 2010-06-10 Unisys Corporation Method and system for building a B-tree
KR20110052301A (ko) * 2009-11-12 2011-05-18 고려대학교 산학협력단 무선 데이터 방송 스트림에서 위치 기반 상위­k질의 처리 방법
KR20140049326A (ko) * 2012-10-17 2014-04-25 주식회사 리얼타임테크 혼합 질의 처리를 위한 색인 생성 방법, 혼합 질의 처리 방법 및 색인 자료구조를 기록한 기록 매체

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112559554A (zh) * 2020-12-24 2021-03-26 北京百家科技集团有限公司 一种查询语句优化方法及装置
CN112559554B (zh) * 2020-12-24 2024-01-26 北京百家科技集团有限公司 一种查询语句优化方法及装置
CN114896458A (zh) * 2022-05-12 2022-08-12 河南创源生物技术有限公司 一种猪的基因库数据检索方法及系统、存储介质
CN115292315A (zh) * 2022-07-29 2022-11-04 广州市玄武无线科技股份有限公司 一种基于用户行为的数据库表字段索引建立方法及系统

Also Published As

Publication number Publication date
KR20200059502A (ko) 2020-05-29
KR102351846B1 (ko) 2022-01-18

Similar Documents

Publication Publication Date Title
US11416464B2 (en) Optimizing wide data-type storage and analysis of data in a column store database
US5960426A (en) Database system and method for supporting current of cursor updates and deletes from a select query from one or more updatable tables in single node and mpp environments
Yuan et al. TripleBit: a fast and compact system for large scale RDF data
US5581756A (en) Network database access system to which builds a table tree in response to a relational query
US7949687B1 (en) Relational database system having overlapping partitions
EP0747839A1 (en) Database management system with improved indexed accessing
JP3914662B2 (ja) データベース処理方法及び実施装置並びにその処理プログラムを記憶した媒体
CA2388515C (en) System for managing rdbm fragmentations
US8676785B2 (en) Translator of statistical language programs into SQL
CN112579610A (zh) 多数据源结构分析方法、系统、终端设备及存储介质
US6343286B1 (en) Efficient technique to defer large object access with intermediate results
WO2011057259A1 (en) Enabling faster full-text searching using a structured data store
CN110795526B (zh) 一种用于检索系统的数学公式索引创建方法与系统
WO2021107211A1 (ko) 인메모리 데이터베이스 기반의 시계열 데이터 관리시스템
KR102351846B1 (ko) 분산형 데이터베이스상의 인덱스 병합을 활용한 질의 최적화 방법
CN115391424A (zh) 数据库查询的处理方法、存储介质与计算机设备
WO2018182060A1 (ko) 관계형 데이터베이스 기반의 텍스트 로그데이터 저장 및 검색 방법
CN115374121A (zh) 数据库索引的生成方法、机器可读存储介质与计算机设备
US12541515B2 (en) One-hot encoder using lazy evaluation of relational statements
WO2023080392A1 (ko) 지식베이스를 이용한 멀티-홉 자연어 문서 검색 방법
Alkowaileet et al. Columnar formats for schemaless LSM-based document stores
WO2019189962A1 (ko) 분산 데이터베이스에서의 복제본이 존재하는 데이터에 대한 질의 병렬화 방법
CN115391363A (zh) 数据库索引的更新方法、存储介质与计算机设备
Kersten et al. The architecture of the PLAIN data base handler
CN116821180A (zh) 一种支持FlinkSQL数据脱敏的控制方法及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18940499

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18940499

Country of ref document: EP

Kind code of ref document: A1