KR101311409B1 - Partition scan method and device, memory system, and data alignment method using partial index rid alignment - Google Patents

Partition scan method and device, memory system, and data alignment method using partial index rid alignment Download PDF

Info

Publication number
KR101311409B1
KR101311409B1 KR1020110077900A KR20110077900A KR101311409B1 KR 101311409 B1 KR101311409 B1 KR 101311409B1 KR 1020110077900 A KR1020110077900 A KR 1020110077900A KR 20110077900 A KR20110077900 A KR 20110077900A KR 101311409 B1 KR101311409 B1 KR 101311409B1
Authority
KR
South Korea
Prior art keywords
partition
index
size
partitions
key value
Prior art date
Application number
KR1020110077900A
Other languages
Korean (ko)
Other versions
KR20130015731A (en
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 KR1020110077900A priority Critical patent/KR101311409B1/en
Publication of KR20130015731A publication Critical patent/KR20130015731A/en
Application granted granted Critical
Publication of KR101311409B1 publication Critical patent/KR101311409B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1668Details of memory controller

Abstract

본 발명은 적어도 하나의 레코드를 저장하고 있는 데이터베이스 테이블 및 상기 레코드의 인덱스를 모아 놓은 인덱스 엔트리를 포함하는 메모리에 대해 키 값에 따라 부분적인 인덱스 RID(Row IDentifier) 정렬을 통해 파티션을 스캔(scan)하는 방법에 있어서, 메모리 컨트롤러가 상기 키 값에 따라 인덱스 엔트리를 정렬하는 단계; 상기 메모리 컨트롤러가 상기 키 값에 따라 정렬된 인덱스 엔트리를 상기 파티션 단위로 분할하는 단계; 및 상기 메모리 컨트롤러가 상기 분할된 파티션들에 대해 상기 인덱스 RID 순으로 데이터베이스 테이블에서 상기 인덱스 RID가 가리키는 레코드를 읽어오고 내부 정렬을 수행하는 단계를 포함하는 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 방법. 파티션 스캔 방법 및 장치, 메모리 시스템, 및 데이터 정렬 방법을 제공한다.The present invention scans a partition through a partial index Low IDentifier (RID) sorting according to a key value in a memory including a database table storing at least one record and an index entry in which the index of the record is collected. A method, comprising: sorting an index entry according to the key value by a memory controller; Dividing, by the memory controller, the index entries arranged according to the key value by the partition unit; And reading, by the memory controller, the records indicated by the index RIDs from the database table in the index RID order of the partitions, and performing an internal sort. A partition scan method and apparatus, a memory system, and a data sorting method are provided.

Description

부분적인 인덱스 RID 정렬을 통한 파티션 스캔 방법 및 장치, 메모리 시스템, 및 데이터 정렬 방법{PARTITION SCAN METHOD AND DEVICE, MEMORY SYSTEM, AND DATA ALIGNMENT METHOD USING PARTIAL INDEX RID ALIGNMENT}PARTITION SCAN METHOD AND DEVICE, MEMORY SYSTEM, AND DATA ALIGNMENT METHOD USING PARTIAL INDEX RID ALIGNMENT}

본 발명은 파티션 스캔 방법 및 장치, 메모리 시스템, 및 데이터 정렬 방법에 관한 것으로, 보다 상세하게는 한 번의 읽고 쓰기로 정렬을 수행하여 정렬 과정 중에 시간이 가장 많이 걸리는 디스크 입출력 횟수를 줄이는 파티션 스캔 방법 및 장치, 상기 장치를 포함하는 메모리 시스템, 및 데이터 정렬 방법에 관한 것이다.
The present invention relates to a partition scan method and apparatus, a memory system, and a data sorting method. More particularly, the present invention relates to a partition scan method for reducing the number of disk I / Os that require the most time during the sorting process by performing a single read and write operation. A device, a memory system including the device, and a data alignment method.

일반적으로 핸드폰, PDA 등과 같은 소형 무선단말기에는 효율적인 데이터베이스 관리를 위한 embedded DBMS(DataBase Management System)가 탑재되고 있으며, 이러한 DBMS는 RTOS(Realtime OS) 또는 Middleware의 파일 시스템과 메모리 함수를 이용하여 데이터를 관리하는 시스템 소프트웨어로서, 테이블을 직접 핸들링할 수 있는 DB api 와 3G 언어인 SQL(Structured query language)을 사용하여 데이터를 관리할 수 있는 SQL api를 제공한다.In general, small wireless terminals such as mobile phones and PDAs are equipped with an embedded DBMS (Database Management System) for efficient database management. These DBMSs manage data using RTOS (Realtime OS) or middleware file system and memory functions. It provides system software that can directly handle tables, and SQL api that can manage data using Structured Query Language (SQL), a 3G language.

도 1은 종래의 디비엠에스(DBMS) 구조를 도시한 도면이다. 도 1에 도시된 바와 같이, 일반적인 DBMS 구조는 크게 데이터파일이 저장되는 플래쉬 메모리(150)와, 데이터의 처리를 위한 램(RAM: 100)으로 구성된다. 플래쉬 메모리(150)에는 테이블 레코드(161)를 포함하는 데이터베이스 테이블(160), 인덱스 엔트리(170), 액티브 로그(180) 등이 저장되어 있고, 램(100)에는 데이터베이스 테이블(160)의 정렬을 위한 메모리 공간(sort memory: 120), 인덱스 엔트리(170)의 처리를 위한 인덱스 버퍼(121), 로그 파일(180)의 처리를 위한 로그 버퍼(122), 데이터베이스 테이블(160)의 처리를 위한 버퍼 캐쉬(123), 데이터베이스 테이블 및 인덱스 엔트리(170)의 관리동작 제어를 위한 스토리지 매니저(110), 데이터 입출력시 파손된 데이터의 복구를 수행하는 리커버리 매니저로 구성된다.1 is a diagram showing a conventional DBMS (DBMS) structure. As shown in FIG. 1, a general DBMS structure includes a flash memory 150 in which a data file is stored, and a RAM 100 for processing data. The flash memory 150 stores the database table 160 including the table record 161, the index entry 170, the active log 180, and the like, and the RAM 100 arranges the database table 160. Memory space for sort (120), index buffer 121 for processing the index entry 170, log buffer 122 for processing the log file 180, buffer for processing the database table 160 The storage manager 110 for controlling the management operation of the cache 123, the database table and the index entry 170, and a recovery manager for recovering damaged data during data input and output.

데이터베이스 테이블(160)이란 행과 열의 개념을 가진 데이터로, 예컨대, 사원이라는 테이블에 사원번호, 이름, 나이, 부서 순으로 데이터들이 저장되어 있는 것을 말한다. 데이터베이스 테이블(160)은 다수의 레코드(161)를 포함할 수 있는데, 레코드(161)는 여러가지 필드를 합하여 데이터를 체계적으로 관리할 수 있도록 해 놓은 것을 말한다. The database table 160 is data having a concept of rows and columns, for example, data stored in an employee number, name, age, and department in a table called employee. The database table 160 may include a plurality of records 161. The records 161 may be a combination of various fields to systematically manage data.

데이터베이스 테이블(160)에 주소록, 스케줄 관리를 위한 메모, 기념일, 스케줄정보, MP3 데이터, 미디어, 콜 로그(Call log), 단문메세지(SMS) 등과 같은 데이터가 수록될 수 있으며, 인덱스 엔트리(170)에는 데이터베이스 테이블(160)에 저장되어 있는 각종 데이터의 인덱스 정보(RID: Row IDentifier)와 데이터를 구분할 수 있는 키 값이 저장된다.The database table 160 may include data such as an address book, a memo for schedule management, an anniversary, schedule information, MP3 data, media, a call log, a short message, and the like, and an index entry 170. In the table 160, index information (RID: Row IDentifier) of various data stored in the database table 160 and key values for distinguishing data are stored.

그리고, 인덱스 엔트리(170)에 저장되는 인덱스 정보(RID)는 트리 구조로 형성하는데, 트리 구조는 하나의 상위 트리 노드에 인덱스 정보(RID)가 저장되고, 그 상위 트리 노드의 하측에 두 개의 하위 트리 노드가 연결된 구조를 갖고 있다. In addition, the index information RID stored in the index entry 170 is formed in a tree structure. In the tree structure, the index information RID is stored in one upper tree node, and two lower children are located below the upper tree node. Tree nodes have a linked structure.

RID는 간단하게 말해서 row의 위치를 말해주는 것이다. 즉, 저장되어있는 row가 어디에 있는 줄 알아야 해당 데이터를 읽으러 갈 수 있기 때문에, 데이터의 위치를 가리키는 위치 포인터(pointer)라고 생각할 수 있다. 실제 우리가 select 문을 사용했을 때, 이 RID를 알아서 해당 데이터를 RID가 가리키는 datafile #, block #과 같은 블록에서 몇 번째 row인가 하는 정보가 있어야만 정확한 row 데이터를 알고 사용자에게 값을 줄 수 있다.RID simply says the location of the row. In other words, you can think of it as a location pointer that points to the location of the data because you need to know where the stored row is to read the data. In fact, when we use the select statement, we need to know this RID and know how many rows are in the block such as datafile # and block # that the RID points to, so we can know the exact row data and give the value to the user.

이러한 종래 트리구조에 의한 데이터 스캔 방법은 검색을 위한 키(key) 값이 주어졌을 때, 그 주어진 키 값과 트리 노드에 존재하는 인덱스 키 값을 일일이 비교하게 되며, 이러한 비교동작 수행 중에 키 값과 일치하는 인덱스 키 값을 발견하게 되면 보유하고 있는 인덱스 정보를 이용하여 해당 데이터를 데이터베이스 테이블에서 읽어와 해당 위치에 정보를 저장하거나 그 정보를 읽어내어 출력하게 되는 구조를 갖게 된다. 종래의 스캔 방법은 특정 데이터의 검색시 주어진 키 값에 해당하는 인덱스 정보(RID)를 찾기 위해 트리에 존재하는 모든 인덱스 정보(RID)에 연결된 데이터를 읽어와 비교해야만 하므로 데이터를 읽어올 수 있는 버퍼 공간이 충분하지 못할 경우 데이터에 액세스(access)하는 빈도수가 많아지게 되어 신속한 검색이 이루어지지 않게 되는 문제점이 발생하고 있었다.In the conventional data scanning method of the tree structure, when a key value for searching is given, the given key value and the index key value existing in the tree node are compared one by one. If a matching index key value is found, the data is read from the database table using the index information and the information is stored in the corresponding location or read and output. Conventional scanning method has to read and compare the data connected to all index information (RID) in the tree to find the index information (RID) corresponding to a given key value when searching for specific data, so that the data can be read buffer When there is not enough space, the frequency of accessing the data increases, which causes a problem of not being able to search quickly.

특히 소형 무선단말기의 데이터베이스와 같이 데이터 영역에 대해서 버퍼 캐쉬를 유지하고 사용하는 환경에서는 데이터에 액세스하는 빈도수가 많아지게 되면 성능 저해에 많은 영향을 주게 되는 문제점이 있었다.In particular, in an environment in which a buffer cache is maintained and used for a data area such as a database of a small wireless terminal, when the frequency of data access is increased, there is a problem in that performance is adversely affected.

또한, 종래의 인덱스 RID 정렬을 통한 인덱스 기반 접근 방식은 결과로 출력된 데이터들이 사용자가 입력한 키 값이 아니라 RID 순으로 정렬되어 있기 때문에 추가적인 정렬 작업을 발생시키는 문제가 있었다.
In addition, the index-based approach using the conventional index RID sorting has a problem of generating additional sorting operations because the resulting data is sorted in RID order rather than a key value input by the user.

한국공개특허 1020070007264 ("비순차 갱신 블록 관리를 구비한 비휘발성 메모리 및 방법", 쌘디스크 코포레이션, 2007.01.15 공개)Korean Unexamined Patent Publication No. 1020070007264 ("Non-volatile Memory and Method with Non-Sequential Update Block Management", HDD Disc Corporation, Jan. 15, 2007) 한국등록특허 100981317 ("소형 무선단말기용 디비엠에스의 그룹핑 분류된 트리구조인덱스 제공방법과 이를 이용한 정보검색방법", 이너비트 주식회사, 2010.09.10 공개)Korean Registered Patent 100981317 ("Method for providing grouped and classified tree structure indexes of DBS for small wireless terminals and information retrieval method using them", Innerbit Co., 2010.09.10 published)

본 발명의 목적은 정렬을 수행하는 경우에 있어서 메모리가 부족하다면 두 번 이상 디스크에 내려쓰는 경우가 발생할 수 있는데, 이를 방지하기 위해 한 번의 읽고 쓰기로 정렬을 수행하여 정렬 과정 중에 시간이 가장 많이 걸리는 디스크 입출력 횟수를 줄여 성능을 개선한 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 방법 및 장치, 이를 포함하는 메모리 시스템, 및 데이터 정렬 방법을 제공하는 것이다. An object of the present invention is to write to the disk more than once if there is not enough memory when performing the sort, in order to prevent this by performing a sort with one read and write the most time during the sorting process The present invention provides a method and a device for scanning a partition through partial index RID sorting, a memory system including the same, and a data sorting method for improving performance by reducing the number of disk I / Os.

또한, 본 발명의 다른 목적은 결과로 출력된 데이터들이 RID 순이 아니라 사용자의 키 값 순으로 정렬되기 때문에 추가적인 정렬 작업을 발생시키지 않는 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 방법 및 장치 및 이를 포함하는 메모리 시스템을 제공하는 것이다.
In addition, another object of the present invention is a partition scan method and apparatus using a partial index RID sort that does not cause additional sorting operation because the resulting data is sorted by the user's key value rather than the RID order and memory including the same To provide a system.

본 발명의 일 실시예에 따른 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 방법은 적어도 하나의 레코드를 저장하고 있는 데이터베이스 테이블 및 상기 레코드의 인덱스를 모아 놓은 인덱스 엔트리를 포함하는 메모리에 대해 키 값에 따라 부분적인 인덱스 RID(Row IDentifier) 정렬을 통해 파티션을 스캔(scan)하는 방법에 있어서, 메모리 컨트롤러가 상기 키 값에 따라 인덱스 엔트리를 정렬하는 단계; 상기 메모리 컨트롤러가 상기 키 값에 따라 정렬된 인덱스 엔트리를 상기 파티션 단위로 분할하는 단계; 및 상기 메모리 컨트롤러가 상기 분할된 파티션들에 대해 상기 인덱스 RID 순으로 데이터베이스 테이블에서 상기 인덱스 RID가 가리키는 레코드를 읽어오고 내부 정렬을 수행하는 단계를 포함할 수 있다.According to an embodiment of the present invention, a partition scan method using a partial index RID sorting is performed according to a key value for a memory including a database table storing at least one record and an index entry collecting the indexes of the records. CLAIMS What is claimed is: 1. A method of scanning a partition through an index Low IDentifier (RID) alignment, the method comprising: sorting an index entry according to the key value by a memory controller; Dividing, by the memory controller, the index entries arranged according to the key value by the partition unit; And reading, by the memory controller, a record indicated by the index RID from a database table in the index RID order of the partitions, and performing an internal sort.

상기 파티션 단위로 분할하는 단계에서, 상기 메모리 컨트롤러가 파티션의 크기 및 개수를 계산하고 상기 계산된 파티션의 크기 및 개수에 따라 상기 키 값에 따라 정렬된 인덱스 엔트리를 상기 파티션 단위로 분할할 수 있다.In the dividing into the partition unit, the memory controller may calculate the size and number of partitions and divide the index entry arranged in the partition unit according to the key value according to the calculated size and number of partitions.

상기 파티션 단위로 분할하는 단계에서, 상기 메모리 컨트롤러가 정렬에 할당되어 있는 메모리의 크기(sort size)와 상기 테이블 내의 레코드의 크기를 비교하여 상기 파티션의 크기 및 개수를 계산할 수 있다.In the partitioning step, the size and number of partitions may be calculated by comparing the sort size of the memory allocated to the sort to the size of the records in the table.

상기 파티션 단위로 분할하는 단계에서, 상기 파티션의 크기가 상기 정렬에 할당되어 있는 메모리와 동일할 수 있다.In the partitioning step, the size of the partition may be the same as the memory allocated to the alignment.

상기 파티션 단위로 분할하는 단계에서, 상기 파티션의 개수가 상기 테이블 내의 레코드의 크기에 비례할 수 있다.In the partitioning step, the number of partitions may be proportional to the size of a record in the table.

본 발명의 일 실시예에 따른 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 장치는 적어도 하나의 레코드를 저장하고 있는 데이터베이스 테이블 및 상기 레코드의 인덱스를 모아 놓은 인덱스 엔트리를 포함하는 메모리에 대해 키 값에 따라 부분적인 인덱스 RID(Row IDentifier) 정렬을 통해 파티션을 스캔(scan)하는 장치에 있어서, 상기 키 값에 따라 인덱스 엔트리를 정렬하는 키 값 정렬부; 상기 키 값에 따라 정렬된 인덱스 엔트리를 상기 파티션 단위로 분할하는 파티션 분할부; 및 상기 분할된 파티션들을 상기 인덱스 RID 순으로 데이터베이스 테이블에서 상기 인덱스 RID가 가리키는 레코드를 읽어오고 내부 정렬을 수행하는 파티션 스캔부를 포함할 수 있다.According to an embodiment of the present invention, a partition scanning apparatus through partial index RID sorting may be performed according to a key value with respect to a memory including a database table storing at least one record and an index entry collecting the indexes of the records. An apparatus for scanning a partition through an index Low IDentifier (RID) sorting, comprising: a key value sorter for sorting an index entry according to the key value; A partition dividing unit dividing the index entries sorted according to the key value into the partition units; And a partition scan unit that reads the records indicated by the index RIDs from a database table in the partitioned partitions in the index RID order and performs an internal sort.

상기 파티션 분할부는 파티션의 크기 및 개수를 계산하고 상기 계산된 파티션의 크기 및 개수에 따라 상기 키 값에 따라 정렬된 인덱스 엔트리를 상기 파티션 단위로 분할할 수 있다.The partition dividing unit calculates the size and number of partitions and divides the index entries arranged according to the key value according to the calculated size and number of partitions in the partition unit.

상기 파티션 분할부는 정렬에 할당되어 있는 메모리의 크기와 상기 테이블 내의 레코드의 크기를 비교하여 상기 파티션의 크기 및 개수를 계산할 수 있다.The partition partitioner may calculate the size and number of partitions by comparing the size of the memory allocated to the sort with the size of the records in the table.

상기 파티션 분할부는 상기 파티션의 크기를 상기 정렬에 할당되어 있는 메모리와 동일하도록 계산할 수 있다.The partition partitioner may calculate the size of the partition to be equal to the memory allocated to the alignment.

상기 파티션 분할부는 상기 파티션의 개수를 상기 테이블 내의 레코드의 크기에 비례하도록 계산할 수 있다.The partition dividing unit may calculate the number of partitions to be proportional to the size of a record in the table.

본 발명의 일 실시예에 따른 부분적인 인덱스 RID 정렬을 통한 메모리 시스템은 키(key) 값에 따라 부분적인 인덱스 RID(Row IDentifier) 정렬을 통하여 파티션을 스캔(scan)할 수 있는 메모리 시스템에 있어서, 적어도 하나의 레코드를 저장하고 있는 데이터베이스 테이블 및 상기 레코드의 인덱스를 모아 놓은 인덱스 엔트리를 포함하는 메모리와 상기 키 값에 따라 상기 인덱스 엔트리를 정렬하고, 상기 키 값에 따라 정렬된 인덱스 엔트리를 상기 파티션 단위로 분할한 후, 상기 분할된 파티션들을 상기 인덱스 RID 순으로 내부 정렬을 수행하는 메모리 컨트롤러를 포함할 수 있다.In the memory system through the partial index RID sorting according to an embodiment of the present invention, a memory system capable of scanning a partition through the partial index row IDentifier (RID) sorting according to a key value, A memory including an index entry storing an index of the record and a database table storing at least one record, and sorting the index entry according to the key value, and sorting the index entry according to the key value in the partition unit. After dividing into, the memory controller may perform an internal sorting of the partitions in the index RID order.

상기 메모리 컨트롤러는 상기 키 값에 따라 상기 인덱스 엔트리를 정렬하는 키 값 정렬부; 상기 파티션의 크기 및 개수를 계산하고 상기 계산된 파티션의 크기 및 개수에 따라 상기 키 값에 따라 정렬된 인덱스 엔트리를 상기 파티션 단위로 분할하는 파티션 분할부; 및 상기 분할된 파티션들을 상기 인덱스 RID 순으로 상기 테이블에서 읽어오고 내부 정렬을 수행하는 파티션 스캔부를 포함할 수 있다.The memory controller includes a key value sorter for sorting the index entry according to the key value; A partition dividing unit for calculating the size and number of the partitions and dividing the index entries arranged according to the key values according to the calculated size and number of partitions in the partition unit; And a partition scan unit that reads the partitioned partitions from the table in the index RID order and performs an internal sort.

상기 메모리 컨트롤러는 정렬에 할당되어 있는 메모리의 크기와 상기 테이블 내의 레코드의 크기를 비교하여 상기 파티션의 크기 및 개수를 계산할 수 있다.The memory controller may calculate the size and number of partitions by comparing the size of the memory allocated to the alignment with the size of the records in the table.

상기 메모리 컨트롤러는 상기 파티션의 크기를 상기 정렬에 할당되어 있는 메모리와 동일하게 계산할 수 있다.The memory controller may calculate the size of the partition equal to the memory allocated to the alignment.

상기 메모리 컨트롤러는 상기 파티션의 개수를 상기 테이블 내의 레코드의 크기에 비례하게 계산할 수 있다.The memory controller may calculate the number of partitions in proportion to the size of a record in the table.

상기 메모리는 플래시 메모리 또는 하드 디스크 중 어느 하나일 수 있다.The memory may be either a flash memory or a hard disk.

본 발명의 일 실시예에 따른 부분적인 인덱스 RID 정렬을 통한 데이터 정렬 방법은 적어도 하나의 레코드를 저장하고 있는 데이터베이스 테이블 및 상기 레코드의 인덱스를 모아 놓은 인덱스 엔트리를 포함하는 메모리에 대해 키(key) 값에 따라 부분적인 인덱스 RID(Row IDentifier) 정렬을 통하여 데이터를 정렬하는 방법에 있어서, 메모리 컨트롤러가 상기 키 값에 따라 인덱스 엔트리를 정렬하는 단계; 메모리 컨트롤러가 상기 키 값에 따라 정렬된 인덱스 엔트리를 상기 파티션 단위로 분할하는 단계; 및 메모리 컨트롤러가 상기 분할된 파티션들을 다시 상기 키 값에 따라 내부 정렬을 수행하는 단계를 포함할 수 있다.According to an embodiment of the present invention, a method of sorting data through partial index RID sorting may include a key value for a memory including a database table storing at least one record and an index entry in which indexes of the records are collected. A method for sorting data through partial index row IDentifier (RID) sorting, the method comprising: sorting an index entry according to the key value by a memory controller; Dividing, by the memory controller, the index entries sorted according to the key value by the partition unit; And performing, by the memory controller, internal sorting of the divided partitions according to the key value.

상기 파티션 단위로 분할하는 단계에서 상기 메모리 컨트롤러가 파티션의 크기 및 개수를 계산하고 상기 계산된 파티션의 크기 및 개수에 따라 상기 키 값에 따라 정렬된 인덱스 엔트리를 상기 파티션 단위로 분할할 수 있다.In the partitioning step, the memory controller may calculate the size and number of partitions and divide the index entries arranged according to the key value according to the calculated size and number of partitions into the partition units.

상기 파티션 단위로 분할하는 단계에서 상기 메모리 컨트롤러가 정렬에 할당되어 있는 메모리의 크기(sort size)와 상기 테이블 내의 레코드의 크기를 비교하여 상기 파티션의 크기 및 개수를 계산할 수 있다.In the partitioning step, the size and number of partitions may be calculated by comparing the sort size of the memory allocated to the sort to the size of the records in the table.

상기 파티션 단위로 분할하는 단계에서 상기 파티션의 크기가 상기 정렬에 할당되어 있는 메모리와 동일할 수 있다.In the dividing step by the partition unit, the size of the partition may be the same as the memory allocated to the alignment.

상기 파티션 단위로 분할하는 단계에서 상기 파티션의 개수가 상기 테이블 내의 레코드들의 크기에 비례할 수 있다.
In the partitioning step, the number of partitions may be proportional to the size of records in the table.

본 발명의 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 방법 및 장치, 이를 포함하는 메모리 시스템, 및 데이터 정렬 방법에 따르면, 임의적인 접근을 최소화하고 순차적인 접근을 효과적으로 처리할 수 있게 설계되었기 때문에 플래시 메모리를 이용한 엔터프라이즈 스토리지 수단에 있어서 효율이 크게 증대될 수 있다.According to the method and apparatus for partition scanning through partial index RID sorting, a memory system including the same, and a data sorting method of the present invention, a flash memory is designed because it is designed to minimize random access and efficiently process sequential access. In the enterprise storage means used, the efficiency can be greatly increased.

또한, 본 발명의 파티션 스캔 방법 및 장치, 이를 포함하는 메모리 시스템, 및 데이터 정렬 방법에 따르면, 대용량 서버에서 원하는 데이터를 원하는 순서로 빨리 찾을 수 있고, 빠른 스캔과 정렬을 통해 엔터프라이즈급 플래시 SSD 제품뿐 아니라 기존 하드디스크에서 장점을 보일 수 있을 뿐만 아니라 플래시 관련 소프트웨어 프로그램을 개발하는데 기여할 수 있다.
In addition, according to the partition scanning method and apparatus of the present invention, a memory system including the same, and a data sorting method, the desired data can be quickly found in a desired order in a large-capacity server. Not only can it benefit from existing hard disks, it can also contribute to developing flash-related software programs.

도 1은 종래의 디비엠에스(DBMS) 구조를 도시한 도면,
도 2는 본 발명의 일 실시예에 따른 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 방법을 개략적으로 나타낸 도면,
도 3은 본 발명의 일 실시예에 따른 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 방법의 전체 흐름도,
도 4는 본 발명의 일 실시예에 따른 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 방법 중 키 값 정렬 단계의 상세 흐름도,
도 5는 본 발명의 일 실시예에 따른 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 방법 중 파티션 분할 단계의 상세 흐름도,
도 6은 본 발명의 일 실시예에 따른 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 방법 중 파티션 스캔 단계의 상세 흐름도,
도 7은 본 발명의 일 실시예에 따른 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 장치를 개략적으로 나타낸 블록 다이어그램,
도 8은 본 발명의 일 실시예에 따른 부분적인 인덱스 RID 정렬을 통한 메모리 시스템을 개략적으로 나타낸 블록 다이어그램,
도 9는 본 발명의 다른 실시예에 따른 부분적인 인덱스 RID 정렬을 통한 데이터 정렬 방법을 개략적으로 나타낸 흐름도이다.
1 is a diagram showing a conventional DBMS (DBMS) structure,
2 is a diagram schematically illustrating a partition scanning method through partial index RID alignment according to an embodiment of the present invention;
3 is a flowchart illustrating a partition scan method using partial index RID alignment according to an embodiment of the present invention;
4 is a detailed flowchart illustrating a key value sorting step of a partition scan method using partial index RID sorting according to an embodiment of the present invention;
5 is a detailed flowchart illustrating a partitioning step in a partition scanning method through partial index RID alignment according to an embodiment of the present invention;
6 is a detailed flowchart of a partition scanning step of a partition scanning method through partial index RID alignment according to an embodiment of the present invention;
7 is a block diagram schematically illustrating a partition scan apparatus using partial index RID alignment according to an embodiment of the present invention;
8 is a block diagram schematically illustrating a memory system with partial index RID alignment according to an embodiment of the present invention;
9 is a flowchart schematically illustrating a data sorting method through partial index RID sorting according to another embodiment of the present invention.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세하게 설명하고자 한다.While the invention is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail.

그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.It should be understood, however, that the invention is not intended to be limited to the particular embodiments, but includes all modifications, equivalents, and alternatives falling within the spirit and scope of the invention.

제 1, 제 2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제 1 구성요소는 제 2 구성요소로 명명될 수 있고, 유사하게 제 2 구성요소도 제 1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.Terms such as first and second may be used to describe various components, but the components should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, the first component may be referred to as the second component, and similarly, the second component may also be referred to as the first component. And / or < / RTI > includes any combination of a plurality of related listed items or any of a plurality of related listed items.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다. When a component is referred to as being "connected" or "connected" to another component, it may be directly connected to or connected to that other component, but it may be understood that other components may be present in between. Should be. On the other hand, when an element is referred to as being "directly connected" or "directly connected" to another element, it should be understood that there are no other elements in between.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting of the present invention. Singular expressions include plural expressions unless the context clearly indicates otherwise. In this application, the terms "comprise" or "have" are intended to indicate that there is a feature, number, step, operation, component, part, or combination thereof described in the specification, and one or more other features. It is to be understood that the present invention does not exclude the possibility of the presence or the addition of numbers, steps, operations, components, components, or a combination thereof.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미를 가진 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with the meaning in the context of the relevant art and are to be interpreted in an ideal or overly formal sense unless explicitly defined in the present application Do not.

이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시예를 보다 상세하게 설명하고자 한다. 본 발명을 설명함에 있어 전체적인 이해를 용이하게 하기 위하여 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다. Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In order to facilitate the understanding of the present invention, the same reference numerals are used for the same constituent elements in the drawings and redundant explanations for the same constituent elements are omitted.

도 2는 본 발명의 일 실시예에 따른 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 방법을 개략적으로 나타낸 도면이다. 도 2에 도시된 바와 같이, 인덱스 엔트리(210)는 사용자가 검색하고자 하는 데이터의 인덱스 정보를 저장해 놓은 스토리지(storage)다. 인덱스 엔트리(210)를 사용자가 원하는 조건절에 해당하는 키 값(230)에 따라 정렬하고 데이터를 파티션 단위로 스캔을 수행하고자 할 때, 일차적으로 키 값(230)에 따라 인덱스 엔트리(210)를 정렬하는 작업이 수행되어야 한다. 그러기 위해 키 값(230)을 명확히 하여야 하기 때문에, 인덱스 엔트리(210) 내에서 조건절에 맞는 키 값(230)을 서치(search)하는 과정이 필요하다. 2 is a diagram schematically illustrating a partition scan method through partial index RID alignment according to an embodiment of the present invention. As shown in FIG. 2, the index entry 210 is storage in which index information of data to be searched by a user is stored. When the index entry 210 is sorted according to a key value 230 corresponding to a user's desired condition clause and the data is scanned in partition units, the index entry 210 is first sorted according to the key value 230. To be done. In order to do so, the key value 230 needs to be clarified, and thus, a process of searching for the key value 230 that satisfies the condition within the index entry 210 is required.

조건절이란 사용자가 서치하고자 하는 조건을 의미한다. 사용자가 원하는 조건절을 입력하면, 인덱스 엔트리(210)에서 상기 조건절에 해당하는 키 값(230)을 서치한다. 예컨대 조건절로 숫자 1부터 50까지의 정수와 관련된 데이터를 입력했다면, 키 값(230)은 인덱스 엔트리(210)로부터 1, 2, ..., 50까지의 정수로 서치될 수 있는 것이다. Conditional clause means the condition that user wants to search. When a user inputs a desired condition clause, the index entry 210 searches for a key value 230 corresponding to the condition clause. For example, if data related to integers 1 to 50 are entered as conditional clauses, the key value 230 may be searched for an integer of 1, 2, ..., 50 from the index entry 210.

그리고나서 서치된 키 값(230)에 따라 데이터 엔트리(210)를 파티션 단위로 분할한다. 구체적으로 살펴보면, 데이터 엔트리(210)를 키 값(230)에 따라 파티션 단위로 분할시키기 위해 파티션의 크기 및 개수를 계산하는 과정이 필요하다. 파티션의 크기 및 개수가 계산되면, 인덱스 엔트리(210)는 계산된 파티션의 크기 및 개수에 맞게 파티션 단위로 분할된다. 도 2를 참조하면, 인덱스 엔트리(210)가 파티션 1(250-1), 파티션 2(250-2)부터 파티션 N(250-N)까지 키 값(230) 순으로 정렬되어 있는 것을 알 수 있다. 이후 분할된 파티션들을 인덱스 RID 순으로 데이터베이스 테이블(270)로부터 인덱스 RID가 가리키는 테이블 레코드를 패치(Fetch)하여 읽어 오고, 각각의 파티션을 다시 키 값 순으로 내부 정렬시킨다. 키 값으로 내부 정렬된 각 파티션은 키 값(230) 순으로 파티션이 되어 있기 때문에 각 파티션간 별도의 병합 과정 없이 바로 출력할 수 있다. 도 2에 도시된 바와 같이, 출력 1(290-1)은 파티션 1(250-1)이 RID 순으로 패치되어 다시 키 값으로 정렬된 형태를 나타내고, 출력 2(290-2)는 파티션 2(250-2)의 RID 순으로 패치되어 다시 키 값으로 정렬 형태를, 출력 N(290-N)은 파티션 N(250-N)의 RID 순으로 패치된 다음 다시 키 값으로 정렬 형태를 나타낸다.Then, the data entry 210 is divided into partitions according to the searched key value 230. Specifically, in order to divide the data entry 210 into partitions according to the key value 230, a process of calculating the size and number of partitions is required. When the size and number of partitions are calculated, the index entry 210 is divided into partition units according to the calculated size and number of partitions. Referring to FIG. 2, it can be seen that the index entry 210 is arranged in the order of the key value 230 from partition 1 250-1 and partition 2 250-2 to partition N 250 -N. . After that, the partitioned partitions are fetched from the database table 270 by indexing the table records indicated by the index RIDs, and each partition is internally sorted by key values. Since each partition internally sorted by key values is partitioned in the order of key values 230, the partitions can be immediately output without a separate merging process between the partitions. As shown in FIG. 2, output 1 290-1 indicates that partition 1 250-1 is patched in RID order and sorted again by key values. Output 2 290-2 shows partition 2 ( It is patched in RID order of 250-2) and sorted by key value again, and output N (290-N) is patched in RID order of partition N (250-N) and then sorted by key value again.

도 3은 본 발명의 일 실시예에 따른 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 방법을 개략적으로 나타낸 흐름도이다. 도 3에 도시된 바와 같이, 본 발명에 따른 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 방법은 조건절에 해당하는 키 값에 따라 부분적인 인덱스 RID 정렬을 통하여 파티션을 스캔하는 방법에 있어서, 메모리 컨트롤러가 조건절에 해당하는 키 값에 따라 인덱스 엔트리를 정렬하는 단계(300), 메모리 컨트롤러가 키 값에 따라 정렬된 인덱스 엔트리를 파티션 단위로 분할하는 단계(310) 및 메모리 컨트롤러가 분할된 파티션들에 대해 인덱스 RID 순으로 데이터베이스 테이블에서 인덱스 RID가 가리키는 테이블 레코드를 읽어오고 내부 정렬을 수행하는 단계(320)를 포함할 수 있다. 각 단계에 대한 설명은 이하 도 4 내지 도 6의 각 단계별 상세 흐름도를 참조하여 설명한다.3 is a flowchart schematically illustrating a partition scan method using partial index RID alignment according to an embodiment of the present invention. As shown in FIG. 3, the partition scan method using the partial index RID sorting according to the present invention provides a method for scanning a partition through the partial index RID sorting according to a key value corresponding to a conditional clause. Sorting the index entries according to the key value corresponding to the step 300, the memory controller partitioning the index entries sorted according to the key value in a partition unit 310, and the memory controller indexes the index RIDs for the partitions. And sequentially reading the table records indicated by the index RIDs from the database table and performing an internal sort. Description of each step will be described below with reference to detailed flowcharts of each step of FIGS. 4 to 6.

도 4는 본 발명의 일 실시예에 따른 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 방법 중 키 값 정렬 단계(300)의 상세 흐름도이다. 도 4에 도시된 바와 같이, 본 발명에 따른 파티션 스캔 방법은 먼저 조건절에 해당하는 키 값을 인덱스 엔트리에서 서치한다(400). 전술한 바와 같이, 사용자는 검색하고자 하는 조건절을 입력하기 때문에, 인덱스 엔트리에서 사용자가 원하는 조건절에 해당하는 키 값을 찾아야 한다. 키 값을 찾았으면, 인덱스 엔트리를 키 값에 따라 정렬시킨다(410). 4 is a detailed flowchart of a key value sorting step 300 of a partition scan method using partial index RID sorting according to an embodiment of the present invention. As shown in FIG. 4, the partition scan method according to the present invention first searches for a key value corresponding to a conditional clause in an index entry (400). As described above, since the user inputs a condition clause to be searched, it is necessary to find a key value corresponding to the condition clause desired by the user in the index entry. Once the key value is found, the index entries are sorted according to the key value (410).

도 5는 본 발명의 일 실시예에 따른 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 방법 중 파티션 분할 단계(310)의 상세 흐름도이다. 도 5에 도시된 바와 같이, 파티션 분할 단계는 먼저 정렬에 할당된 메모리의 크기와 테이블 레코드의 크기를 비교하는 과정을 거친다(500). 정렬에 할당된 메모리의 크기가 전체 테이블 레코드의 크기보다 더 클 경우에는, 인덱스 엔트리를 파티션 단위로 나눌 필요 없이 인덱스 RID 정렬을 행할 수 있다. 대용량 데이터베이스 테이블은 거대한 양의 테이블 레코드를 가지고 있으므로 이럴 경우는 극히 예외적일 것이다.5 is a detailed flowchart of a partition partitioning step 310 of a partition scanning method through partial index RID alignment according to an embodiment of the present invention. As shown in FIG. 5, the partitioning step first involves comparing the size of the memory allocated to the sort with the size of the table record (500). If the amount of memory allocated for the sort is larger than the size of the entire table record, index RID sorting can be done without dividing the index entries into partitions. Large database tables have huge amounts of table records, so this would be the exception.

전체 테이블 레코드의 크기가 정렬에 할당된 메모리의 크기보다 클 경우에는, 테이블 레코드를 정렬에 할당된 메모리에서 모두 읽어올 수 없기 때문에 인덱스 엔트리를 정렬에 할당된 메모리에서 읽어올 수 있을 만큼의 크기로 분할해야만 한다. 데이터를 파티션 단위로 나눔에 있어, 파티션의 크기와 개수가 중요한 기능을 담당한다. 파티션의 크기가 너무 작은 경우, 메모리에 입출입 횟수가 많아지게 되어 비효율적이 될 수 있다. 특히, 메모리 입출입 시간은 주기억 장치 접근 시간에 비해 매우 느리므로 입출입 횟수의 최소화가 가장 중요한 성능 개선 방법이 될 수 있다. 반대로, 파티션의 크기가 너무 큰 경우는 정렬에 할당된 메모리의 크기를 벗어날 수 있기 때문에 의도한 성능 개선 효과를 볼 수 없다. If the size of the entire table record is larger than the memory allocated for the sort, the index entries cannot be read from the memory allocated for the sort, so that the index entries are large enough to read from the memory allocated for the sort. It must be divided. In dividing data into partitions, the size and number of partitions play an important role. If the size of the partition is too small, the number of entries and exits in the memory can be large and inefficient. In particular, since the memory entry / exit time is very slow compared to the main memory access time, minimizing the number of entry / exit may be the most important performance improvement method. Conversely, if the size of the partition is too large, you may not be able to see the intended performance improvement because you may be out of the memory allocated for sorting.

따라서, 파티션이 적절한 크기 및 개수를 갖도록 하는 것이 중요한데 이를 위해 본 발명에서는 정렬에 할당되어 있는 메모리의 크기와 테이블 레코드의 크기를 비교하여 내부정렬을 할 수 있는 레코드의 범위로 각 파티션의 크기를 계산한다(510). 즉, 각 파티션의 크기는 정렬에 할당되어 있는 메모리의 크기와 같은 크기로 계산한다. 그리고, 파티션의 개수는 테이블 레코드의 양에 비례하여 계산된다(520). 따라서, 테이블 레코드의 크기를 파티션의 크기만큼 나누면 파티션의 개수를 계산할 수 있다. 예를 들어 100kbyte의 테이블 레코드 데이터가 있고, 정렬에 할당된 메모리가 10kbyte의 크기를 갖는다면, 파티션의 크기는 정렬에 할당된 메모리와 동일하게 10kbyte가 되고, 파티션의 개수는 100÷10을 수행하여 10개가 된다. 파티션의 개수 및 크기에 대한 계산이 끝나면 계산된 파티션의 크기 및 개수에 따라 인덱스 엔트리를 파티션 단위로 분할하는 단계를 수행한다(530). Therefore, it is important to ensure that partitions have an appropriate size and number. For this purpose, the size of each partition is calculated by comparing the size of the memory allocated to the sort with the size of the table record and the range of records that can be internally sorted. (510). In other words, the size of each partition is calculated to be equal to the size of memory allocated for sorting. The number of partitions is calculated in proportion to the amount of table records (520). Therefore, the number of partitions can be calculated by dividing the size of the table record by the size of the partition. For example, if you have 100 kbytes of table record data and the memory allocated for the sort has a size of 10 kbytes, the partition size will be 10 kbytes equal to the memory allocated for the sort, and the number of partitions will be 100 ÷ 10. It becomes ten. After the calculation of the number and size of partitions is completed, the step of dividing the index entry into partition units according to the calculated size and number of partitions is performed (530).

도 6은 본 발명의 일 실시예에 따른 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 방법 중 파티션 스캔 단계(320)의 상세 흐름도이다. 도 6에 도시된 바와 같이, 분할된 파티션 단위의 데이터들은 인덱스 RID 정렬을 통해 데이터베이스 테이블에서 RID가 가리키는 테이블 레코드를 읽어온다(600). 이후, 테이블에서 레코드를 읽어온 파티션에 대해 내부정렬을 수행한 최종결과를 출력한다(610). 위 과정을 테이블이 끝날 때까지 반복하는 것이 바람직하다.6 is a detailed flowchart of a partition scan step 320 of a partition scan method through partial index RID alignment according to an embodiment of the present invention. As shown in FIG. 6, the data of the partitioned partition unit reads the table record indicated by the RID from the database table through index RID sorting (600). Thereafter, the final result of performing internal alignment on the partition from which the record is read from the table is output (610). It is preferable to repeat the above process until the end of the table.

상기한 바와 같은 접근 방법을 통해 각 파티션간의 관계가 일차적으로 키 값 순으로 정렬이 되고 파티션 내부에 대해서만 이차적으로 내부 정렬을 수행하여 정렬을 완료하기 때문에 별도로 파티션간의 데이터를 병합하는 과정 없이 전체 데이터의 정렬을 완성할 수 있다. 또한, 전체 데이터 양과 정렬에 할당된 메모리 크기에 상관없이 데이터를 한번 읽고 쓰는 비용만으로 최종 결과를 산출할 수 있어 데이터베이스의 연산 중 가장 비용이 많이 드는 디스크 접근 비용을 최소화하여 성능 향상에 도움을 줄 수 있는 것이다.Through the above approach, the relationship between each partition is sorted by key value first, and the internal sorting is performed only for the inside of the partition to complete the sort. You can complete the alignment. In addition, regardless of the total amount of data and the amount of memory allocated for sorting, the final result can be calculated at the cost of reading and writing data once, minimizing the most expensive disk accesses during database operations, thereby helping to improve performance. It is.

상기한 바와 같은 파티션 스캔 방법을 사용하여 파티션을 스캔하였을 경우의 파티션의 스캔 비용은 수학식 1을 통해 알아볼 수 있다.The scan cost of a partition when the partition is scanned using the partition scan method as described above can be found through Equation 1.

Figure 112011060464073-pat00001
Figure 112011060464073-pat00001

여기서, blevel(Branch Level)값은 인덱스 트리의 깊이(depth)를 의미하고, selectivity는 선택도를 의미한다. 예컨대, a, b, c, d, e의 조건절이 있고 키 값이 a가 선택되면 a의 선택도는 5분의 1 즉, 20%가 된다. leaf_block은 트리구조에서 최하위 레벨의 블럭수를 나타낸다. 중간의 N은 파티션의 개수, block_utilization_factor는 해당 범위의 테이블을 읽기 위해 실제 읽어야 하는 블록의 갯수를 의미한다. Here, the blevel (Branch Level) value means the depth of the index tree, and selectivity means the selectivity. For example, if there are condition clauses a, b, c, d, and e and the key value a is selected, the selectivity of a becomes one fifth, that is, 20%. leaf_block represents the lowest level number of blocks in the tree structure. N in the middle means the number of partitions, and block_utilization_factor means the number of blocks that must be actually read in order to read the table in the range.

block_utilization_factor를 구하는 것은 우선, 정렬에 할당된 메모리의 크기를 구하고, 해당 테이블의 레코드의 평균 길이를 구한다. 이후 내부 정렬을 할 수 있는 레코드의 수를 구하고, 정렬에 할당된 메모리의 수만큼 인덱스 엔트리의 페이지 번호를 정렬한다. 그리고나서, 중복되지 않는 해당 테이블의 레코드의 수를 구하면 block_utilization_factor 값을 얻을 수 있다. To find the block_utilization_factor, first find the amount of memory allocated for the sort, and then find the average length of the records in the table. It then finds the number of records that can be sorted internally, and sorts the page number of the index entry by the number of memory allocated for sorting. Then, you can get the value of block_utilization_factor by finding the number of records in the table that are not duplicated.

도 7은 본 발명의 일 실시예에 따른 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 장치를 개략적으로 나타낸 블록 다이어그램이다. 도 7에 도시된 바와 같이, 본 발명의 일 실시예에 따른 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 장치는 키 값 정렬부(700), 파티션 분할부(710) 및 파티션 스캔부(720)를 갖추어 이루어질 수 있다.7 is a block diagram schematically illustrating a partition scan apparatus through partial index RID alignment according to an embodiment of the present invention. As shown in FIG. 7, the partition scan apparatus using the partial index RID alignment according to an embodiment of the present invention includes a key value sorter 700, a partition divider 710, and a partition scan unit 720. Can be done.

키 값 정렬부(700)는 조건절에 해당하는 키 값을 인덱스 엔트리(701)에서 서치하고 서치된 키 값에 따라 인덱스 엔트리(701)를 정렬한다.The key value sorter 700 searches for the key value corresponding to the conditional clause in the index entry 701 and sorts the index entry 701 according to the searched key value.

파티션 분할부(720)는 정렬에 할당되어 있는 메모리의 크기와 테이블 레코드의 크기를 비교하여 전술한 바와 같이 데이터를 적절히 분할할 수 있는 파티션의 크기 및 개수를 계산하고, 그에 따라 인덱스 엔트리(701)를 파티션 단위로 분할한다. 파티션의 크기 및 개수는 내부정렬이 가능한 크기로 계산을 하는 것이 바람직하다. 따라서, 각 파티션의 크기는 정렬에 할당되어 있는 메모리의 크기와 같은 크기로 계산하며, 파티션의 개수는 테이블 레코드의 양에 비례하여 계산되며, 이는 전체 데이터를 파티션의 크기로 나눈 값이 된다. 파티션 분할부(710)는 계산된 파티션의 크기 및 개수에 따라 데이터를 파티션 단위로 분할한다. 파티션 분할부(710)에서 데이터를 분할할 때, 파티션간의 관계는 이미 키 값 순으로 정렬이 되어 있기 때문에 파티션 내부 정렬만 수행하면 별도의 데이터 병합 과정 없이 전체 데이터의 정렬을 완성할 수 있다.The partition dividing unit 720 compares the size of the memory allocated to the sort with the size of the table record to calculate the size and number of partitions that can appropriately divide the data as described above, and accordingly the index entry 701 Split into partitions. It is desirable to calculate the size and number of partitions to a size that allows internal sorting. Therefore, the size of each partition is calculated as the size of the memory allocated for sorting, and the number of partitions is calculated in proportion to the amount of table records, which is the total data divided by the size of the partition. The partition dividing unit 710 divides data into partition units according to the calculated size and number of partitions. When partitioning the data in the partition partitioning unit 710, the relations between partitions are already sorted in the order of key values, so that only the intra-partition sorting can complete the sorting of the entire data without a separate data merging process.

파티션 스캔부(720)는 상기와 같이 분할된 파티션 단위의 데이터를 데이터베이스 테이블(702)로부터 인덱스 RID 순으로 레코드를 읽어온다. 데이터베이스 테이블(702)에서 레코드를 읽어온 파티션은 내부 정렬을 수행하게 되고, 최종 결과는 결과 출력부(730)를 통해 출력할 수 있다. 테이블이 끝날 때까지 상기와 같은 과정을 반복하는 것이 바람직하다.The partition scan unit 720 reads records in the partition unit data divided as described above from the database table 702 in the index RID order. The partition from which records are read from the database table 702 performs internal sorting, and the final result may be output through the result output unit 730. It is preferable to repeat the above process until the end of the table.

도 8은 본 발명의 일 실시예에 따른 부분적인 인덱스 RID 정렬을 통한 메모리 시스템(800)을 개략적으로 나타낸 블록 다이어그램이다. 도 7을 참조하면, 도 8의 키 값 정렬부(811), 파티션 분할부(812) 및 피티션 스캔부(813)는 도 7에서 설명한 바와 동일한 역할을 수행한다. 위 세 구성요소(811, 812, 813)는 메모리(820)를 컨트롤하는 기능을 수행하기 때문에 메모리 컨트롤러(810)를 구성한다. 메모리 컨트롤러(810)는 메모리(820) 내의 인덱스 엔트리(821) 및 데이터베이스 테이블(822)을 컨트롤하여 파티션 단위로 적절하게 분할하고 사용자가 원하는 조건절에 맞춰 데이터를 정렬시킬 수 있다. 여기서, 메모리(820)는 인덱스 정보를 저장하고 있는 인덱스 엔트리(821)와 대용량의 데이터베이스 테이블(822)을 포함하고 있다. 메모리(820)는 플래시 메모리가 될 수도 있고, 하드 디스크가 될 수도 있다. 8 is a schematic block diagram of a memory system 800 with partial index RID alignment in accordance with one embodiment of the present invention. Referring to FIG. 7, the key value alignment unit 811, the partition divider 812, and the partition scan unit 813 of FIG. 8 perform the same role as described with reference to FIG. 7. Since the three components 811, 812, and 813 perform a function of controlling the memory 820, the memory controller 810 is configured. The memory controller 810 may control the index entry 821 and the database table 822 in the memory 820 to appropriately partition the partitions and to align the data according to a user's desired condition. Here, the memory 820 includes an index entry 821 that stores index information and a large database table 822. The memory 820 may be a flash memory or a hard disk.

도 9는 본 발명의 다른 실시예에 따른 부분적인 인덱스 RID 정렬을 통한 데이터 정렬 방법을 개략적으로 나타낸 흐름도이다. 도 9에 도시된 바와 같이, 본 발명에 따른 부분적인 인덱스 RID 정렬을 통한 데이터 정렬 방법은 조건절에 해당하는 키 값을 인덱스에서 서치하고 키 값에 따라 데이터를 정렬하는 단계(900), 키 값에 따라 정렬된 인덱스 엔트리를 파티션 단위로 분할하는 단계(910) 및 분할된 파티션들을 다시 키 값에 따라 내부적으로 정렬하는 단계(920)를 갖추어 이루어질 수 있다. 9 is a flowchart schematically illustrating a data sorting method through partial index RID sorting according to another embodiment of the present invention. As shown in FIG. 9, the method for sorting data through partial index RID sorting according to the present invention includes searching for a key value corresponding to a conditional clause in an index and sorting data according to the key value (900). The partitioned index entries may be divided into partition units 910 and partitioned partitions may be internally sorted according to key values 920.

본 발명에 따른 데이터 정렬 방법은 먼저 조건절에 해당하는 키 값을 인덱스에서 서치한다. 이후, 서치된 키 값에 따라 데이터를 정렬한다. 최종 정렬의 출력값은 키 값 순으로 출력되어야 하기 때문에 일차적으로 키 값에 따라 데이터를 정렬하는 것이 선행되어야 한다. In the data sorting method of the present invention, first, a key value corresponding to a conditional clause is searched in an index. The data is then sorted according to the searched key values. Since the output of the final sort must be output in order of the key values, the data must first be sorted according to the key values.

이후, 정렬에 할당되어 있는 메모리와 테이블 레코드의 크기를 비교한다. 정렬에 할당된 메모리의 크기가 테이블 레코드의 크기보다 더 클 경우, 데이터를 파티션 단위로 나눌 필요가 없다. 테이블 레코드의 크기가 정렬에 할당된 메모리의 크기보다 클 경우에는, 테이블 레코드의 데이터를 메모리에서 읽어올 수 없기 때문에 메모리에서 읽어올 수 있을 만큼의 크기로 분할한다. Then, compare the size of the table records with the memory allocated for the sort. If the amount of memory allocated for the sort is larger than the size of the table record, you do not need to divide the data into partitions. If the size of the table record is larger than the memory allocated to the sort, the table record data cannot be read from memory, so it is divided into enough to read from memory.

파티션이 적절한 크기 및 개수를 갖도록 분할하는 것이 중요하기 때문에 본 발명에서는 다음과 같이 파티션의 크기 및 개수를 계산한다. 파티션의 크기는 정렬에 할당되어 있는 메모리의 크기와 테이블 레코드의 크기를 비교하여 내부정렬을 할 수 있는 레코드의 범위로 각 파티션을 계산한다. 각 파티션의 크기는 정렬에 할당되어 있는 메모리의 크기와 같은 크기로 계산하고, 파티션의 개수는 테이블 레코드 양에 비례하여 계산된다. 따라서, 테이블 레코드의 크기를 파티션의 크기만큼 나누면 파티션의 개수를 계산할 수 있다. Since it is important to partition the partition to have an appropriate size and number, the present invention calculates the size and number of partitions as follows. The size of a partition is calculated by comparing the size of the memory allocated for the sort with the size of the table records, and calculating each partition as the range of records that can be sorted internally. The size of each partition is calculated to be equal to the size of memory allocated for sorting, and the number of partitions is calculated in proportion to the amount of table records. Therefore, the number of partitions can be calculated by dividing the size of the table record by the size of the partition.

파티션의 개수 및 크기에 대한 계산이 끝나면 계산된 파티션의 크기 및 개수에 따라 데이터를 파티션 단위로 분할하고, 분할된 파티션 단위의 데이터들에 대해 다시 키 값으로 내부 정렬을 함으로써 데이터 정렬을 완료한다. After the calculation of the number and size of partitions is completed, the data is sorted by partitioning the data according to the calculated size and number of partitions and internally sorting the data of the partitioned partition units by key values again.

이상 도면 및 실시예를 참조하여 설명하였지만, 본 발명의 보호범위가 상기 도면 또는 실시예에 의해 한정되는 것을 의미하지는 않으며 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the spirit or scope of the inventions as defined by the following claims It will be understood that various modifications and changes may be made thereto without departing from the spirit and scope of the invention.

100: 램 110: 스토리지 매니저
120: 정렬에 할당된 메모리 121: 인덱스 버퍼
122: 로그 버퍼 123: 버퍼 캐쉬
150: 플래시 메모리 160: 테이블 레코드
161: 데이터베이스 테이블 170: 인덱스 엔트리
180: 액티브 로그
210: 인덱스 엔트리 230: 키 값
250: 파티션 270: 데이터베이스 테이블
290: 출력 300: 키 값 정렬 단계
310: 파티션 분할 단계 320: 파티션 스캔 단계
400: 키 값 서치 단계 410: 키 값 정렬 단계
500: 메모리와 테이블 레코드 크기 비교 단계
510: 파티션 크기 계산 단계 520: 파티션 개수 계산 단계
530: 파티션 분할 단계 600: 레코드 스캔 단계
610: 내부 정렬 단계 700: 키 값 정렬부
701: 인덱스 엔트리 702: 데이터베이스 테이블
710: 파티션 분할부 720: 파티션 스캔부
730: 결과 출력부 800: 메모리 시스템
810: 메모리 컨트롤러 811: 키 값 정렬부
812: 파티션 분할부 813: 파티션 스캔부
820: 메모리 821: 인덱스 엔트리
822: 데이터베이스 테이블 900: 키 값 정렬 단계
910: 파티션 분할 단계 920: 내부 정렬 단계
100: RAM 110: Storage Manager
120: memory allocated for sort 121: index buffer
122: log buffer 123: buffer cache
150: flash memory 160: table records
161: Database Table 170: Index Entries
180: active log
210: Index entry 230: Key value
250: Partition 270: Database Tables
290: Output 300: Sort Key Values Step
310: partition partition step 320: partition scan step
400: key value search step 410: key value sort step
500: Memory and Table Record Size Comparison Steps
510: Partition size calculation step 520: Partition number calculation step
530: Partition partition step 600: Record scan step
610: internal sorting step 700: key value sorting unit
701: Index Entry 702: Database Table
710: partition partition unit 720: partition scan unit
730: result output unit 800: memory system
810: memory controller 811: key value sorter
812: partition partition unit 813: partition scan unit
820: memory 821: index entry
822: Database Table 900: Sorting Key Values
910: partition partition step 920: internal sort step

Claims (21)

적어도 하나의 레코드를 저장하고 있는 데이터베이스 테이블 및 상기 레코드의 인덱스를 모아 놓은 인덱스 엔트리를 포함하는 메모리에 대해 키 값에 따라 부분적인 인덱스 RID(Row IDentifier) 정렬을 통해 파티션을 스캔(scan)하는 방법에 있어서,
메모리 컨트롤러가 상기 키 값에 따라 인덱스 엔트리를 정렬하는 단계;
상기 메모리 컨트롤러가 상기 키 값에 따라 정렬된 인덱스 엔트리를 상기 파티션 단위로 분할하는 단계; 및
상기 메모리 컨트롤러가 상기 분할된 파티션들에 대해 상기 인덱스 RID 순으로 데이터베이스 테이블에서 상기 인덱스 RID가 가리키는 레코드를 읽어오고 내부 정렬을 수행하는 단계를 포함하는 것을 특징으로 하는 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 방법.
A method for scanning a partition through a partial index row identifier sorting according to a key value for a memory including an index entry that collects an index of the record and a database table storing at least one record. In
A memory controller sorting index entries according to the key value;
Dividing, by the memory controller, the index entries arranged according to the key value by the partition unit; And
And the memory controller reading the record indicated by the index RID from the database table in the index RID order of the partitions and performing an internal sort on the partitions. Way.
제 1 항에 있어서, 상기 파티션 단위로 분할하는 단계에서,
상기 메모리 컨트롤러가 파티션의 크기 및 개수를 계산하고 상기 계산된 파티션의 크기 및 개수에 따라 상기 키 값에 따라 정렬된 인덱스 엔트리를 상기 파티션 단위로 분할하는 것을 특징으로 하는 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 방법.
The method of claim 1, wherein the dividing into partition units comprises:
The memory controller calculates the size and number of partitions and partitions the index entries arranged according to the key values according to the calculated size and number of partitions in the partition unit. Scan method.
제 1 항에 있어서, 상기 파티션 단위로 분할하는 단계에서,
상기 메모리 컨트롤러가 정렬에 할당되어 있는 메모리의 크기(sort size)와 상기 테이블 내의 레코드의 크기를 비교하여 상기 파티션의 크기 및 개수를 계산하는 것을 특징으로 하는 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 방법.
The method of claim 1, wherein the dividing into partition units comprises:
And calculating the size and number of the partitions by comparing the sort size of the memory allocated to the sort with the size of the records in the table.
제 3 항에 있어서, 상기 파티션 단위로 분할하는 단계에서,
상기 파티션의 크기가 상기 정렬에 할당되어 있는 메모리와 동일한 것을 특징으로 하는 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 방법.
The method of claim 3, wherein the dividing into partition units comprises:
And the size of the partition is the same as the memory allocated to the sort.
제 3 항에 있어서, 상기 파티션 단위로 분할하는 단계에서,
상기 파티션의 개수가 상기 테이블 내의 레코드의 크기에 비례하는 것을 특징으로 하는 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 방법.
The method of claim 3, wherein the dividing into partition units comprises:
And the number of partitions is proportional to the size of a record in the table.
적어도 하나의 레코드를 저장하고 있는 데이터베이스 테이블 및 상기 레코드의 인덱스를 모아 놓은 인덱스 엔트리를 포함하는 메모리에 대해 키 값에 따라 부분적인 인덱스 RID(Row IDentifier) 정렬을 통해 파티션을 스캔(scan)하는 장치에 있어서,
상기 키 값에 따라 인덱스 엔트리를 정렬하는 키 값 정렬부;
상기 키 값에 따라 정렬된 인덱스 엔트리를 상기 파티션 단위로 분할하는 파티션 분할부; 및
상기 분할된 파티션들을 상기 인덱스 RID 순으로 데이터베이스 테이블에서 상기 인덱스 RID가 가리키는 레코드를 읽어오고 내부 정렬을 수행하는 파티션 스캔부를 포함하는 것을 특징으로 하는 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 장치.
A device that scans a partition through a partial index Low IDentifier (RID) sort according to a key value for a memory including an index entry that collects the index of the record and a database table that stores at least one record. In
A key value sorter for sorting index entries according to the key value;
A partition dividing unit dividing the index entries sorted according to the key value into the partition units; And
And a partition scan unit which reads the records indicated by the index RID from a database table in the order of the index RIDs, and performs an internal sort.
제 6 항에 있어서, 상기 파티션 분할부는,
파티션의 크기 및 개수를 계산하고 상기 계산된 파티션의 크기 및 개수에 따라 상기 키 값에 따라 정렬된 인덱스 엔트리를 상기 파티션 단위로 분할하는 것을 특징으로 하는 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 장치.
The method of claim 6, wherein the partition partition unit,
Computing the size and number of partitions, and partitions the index entries arranged according to the key value according to the calculated size and number of partitions in the partition unit partition partition scan apparatus using a partial index RID sort.
제 6 항에 있어서, 상기 파티션 분할부는,
정렬에 할당되어 있는 메모리의 크기와 상기 테이블 내의 레코드의 크기를 비교하여 상기 파티션의 크기 및 개수를 계산하는 것을 특징으로 하는 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 장치.
The method of claim 6, wherein the partition partition unit,
And comparing the size of the memory allocated to the sort with the size of the records in the table to calculate the size and number of the partitions.
제 8 항에 있어서, 상기 파티션 분할부는,
상기 파티션의 크기를 상기 정렬에 할당되어 있는 메모리와 동일하도록 계산하는 것을 특징으로 하는 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 장치.
The method of claim 8, wherein the partition partition unit,
And calculating the size of the partition to be equal to the memory allocated to the sort.
제 9 항에 있어서, 상기 파티션 분할부는,
상기 파티션의 개수를 상기 테이블 내의 레코드의 크기에 비례하도록 계산하는 것을 특징으로 하는 부분적인 인덱스 RID 정렬을 통한 파티션 스캔 장치.
The method of claim 9, wherein the partition partition unit,
And counting the number of partitions in proportion to the size of the records in the table.
키(key) 값에 따라 부분적인 인덱스 RID(Row IDentifier) 정렬을 통하여 파티션을 스캔(scan)할 수 있는 메모리 시스템에 있어서,
적어도 하나의 레코드를 저장하고 있는 데이터베이스 테이블 및 상기 레코드의 인덱스를 모아 놓은 인덱스 엔트리를 포함하는 메모리와
상기 키 값에 따라 상기 인덱스 엔트리를 정렬하고, 상기 키 값에 따라 정렬된 인덱스 엔트리를 상기 파티션 단위로 분할한 후, 상기 분할된 파티션들을 상기 인덱스 RID 순으로 데이터베이스 테이블에서 상기 인덱스 RID가 가리키는 레코드를 읽어오고 내부 정렬을 수행하는 메모리 컨트롤러를 포함하는 것을 특징으로 하는 부분적인 인덱스 RID 정렬을 통한 메모리 시스템.
A memory system capable of scanning partitions through partial index row identifier sorting according to key values,
A memory including a database table storing at least one record and an index entry in which the index of the record is collected;
Sorting the index entry according to the key value, dividing the index entry sorted according to the key value in the partition unit, and then, in the database table, the records indicated by the index RID in the index RID order. And a memory controller that reads and performs an internal sort.
제 11 항에 있어서, 상기 메모리 컨트롤러는
상기 키 값에 따라 상기 인덱스 엔트리를 정렬하는 키 값 정렬부;
상기 파티션의 크기 및 개수를 계산하고 상기 계산된 파티션의 크기 및 개수에 따라 상기 키 값에 따라 정렬된 인덱스 엔트리를 상기 파티션 단위로 분할하는 파티션 분할부; 및
상기 분할된 파티션들을 상기 인덱스 RID 순으로 상기 테이블에서 읽어오고 내부 정렬을 수행하는 파티션 스캔부를 포함하는 것을 특징으로 하는 부분적인 인덱스 RID 정렬을 통한 메모리 시스템.
The method of claim 11, wherein the memory controller is
A key value sorter for sorting the index entry according to the key value;
A partition dividing unit for calculating the size and number of the partitions and dividing the index entries arranged according to the key values according to the calculated size and number of partitions in the partition unit; And
And a partition scan unit that reads the partitioned partitions from the table in the index RID order and performs an internal sort.
제 11 항에 있어서, 상기 메모리 컨트롤러는,
정렬에 할당되어 있는 메모리의 크기와 상기 테이블 내의 레코드의 크기를 비교하여 상기 파티션의 크기 및 개수를 계산하는 것을 특징으로 하는 부분적인 인덱스 RID 정렬을 통한 메모리 시스템.
The method of claim 11, wherein the memory controller,
And comparing the size of the memory allocated to the sort with the size of the records in the table to calculate the size and number of the partitions.
제 13 항에 있어서, 상기 메모리 컨트롤러는,
상기 파티션의 크기를 상기 정렬에 할당되어 있는 메모리와 동일하게 계산하는 것을 특징으로 하는 부분적인 인덱스 RID 정렬을 통한 메모리 시스템.
The memory controller of claim 13, wherein the memory controller comprises:
And calculating the size of the partition equally to the memory allocated to the sort.
제 13 항에 있어서, 상기 메모리 컨트롤러는,
상기 파티션의 개수를 상기 테이블 내의 레코드의 크기에 비례하게 계산하는 것을 특징으로 하는 부분적인 인덱스 RID 정렬을 통한 메모리 시스템.
The memory controller of claim 13, wherein the memory controller comprises:
And counting the number of partitions in proportion to the size of the records in the table.
제 11 항에 있어서,
상기 메모리는 플래시 메모리 또는 하드 디스크 중 어느 하나인 것을 특징으로 하는 부분적인 인덱스 RID 정렬을 통한 메모리 시스템.
The method of claim 11,
And the memory is one of a flash memory or a hard disk.
적어도 하나의 레코드를 저장하고 있는 데이터베이스 테이블 및 상기 레코드의 인덱스를 모아 놓은 인덱스 엔트리를 포함하는 메모리에 대해 키(key) 값에 따라 부분적인 인덱스 RID(Row IDentifier) 정렬을 통하여 데이터를 정렬하는 방법에 있어서,
메모리 컨트롤러가 상기 키 값에 따라 인덱스 엔트리를 정렬하는 단계;
메모리 컨트롤러가 상기 키 값에 따라 정렬된 인덱스 엔트리를 파티션 단위로 분할하는 단계; 및
메모리 컨트롤러가 상기 분할된 파티션들에 대해 다시 상기 키 값에 따라 내부 정렬을 수행하는 단계를 포함하는 것을 특징으로 하는 부분적인 인덱스 RID 정렬을 통한 데이터 정렬 방법.
A method of sorting data through a partial index row identifier sorting according to a key value for a memory including an index entry storing an index of the record and a database table storing at least one record. In
A memory controller sorting index entries according to the key value;
Dividing, by the memory controller, the index entries arranged according to the key value in units of partitions; And
And a memory controller performing internal sorting on the partitions again according to the key value.
제 17 항에 있어서, 상기 파티션 단위로 분할하는 단계에서,
상기 메모리 컨트롤러가 파티션의 크기 및 개수를 계산하고 상기 계산된 파티션의 크기 및 개수에 따라 상기 키 값에 따라 정렬된 인덱스 엔트리를 상기 파티션 단위로 분할하는 것을 특징으로 하는 부분적인 인덱스 RID 정렬을 통한 데이터 정렬 방법.
18. The method of claim 17, wherein in the partitioning step,
The memory controller calculates the size and number of partitions and divides the index entries arranged according to the key value according to the calculated size and number of partitions into the partition unit. How to sort.
제 17 항에 있어서, 상기 파티션 단위로 분할하는 단계에서,
상기 메모리 컨트롤러가 정렬에 할당되어 있는 메모리의 크기(sort size)와 상기 테이블 내의 레코드의 크기를 비교하여 상기 파티션의 크기 및 개수를 계산하는 것을 특징으로 하는 부분적인 인덱스 RID 정렬을 통한 데이터 정렬 방법.
18. The method of claim 17, wherein in the partitioning step,
And calculating the size and number of the partitions by comparing the sort size of the memory allocated to the sort with the size of the records in the table.
제 19 항에 있어서, 상기 파티션 단위로 분할하는 단계에서,
상기 파티션의 크기가 상기 정렬에 할당되어 있는 메모리와 동일한 것을 특징으로 하는 부분적인 인덱스 RID 정렬을 통한 데이터 정렬 방법.
20. The method of claim 19, wherein in the dividing step in the partition unit,
And the size of the partition is the same as the memory allocated to the sort.
제 19 항에 있어서, 상기 파티션 단위로 분할하는 단계에서,
상기 파티션의 개수가 상기 테이블 내의 레코드들의 크기에 비례하는 것을 특징으로 하는 부분적인 인덱스 RID 정렬을 통한 데이터 정렬 방법.
20. The method of claim 19, wherein in the dividing step in the partition unit,
And the number of partitions is proportional to the size of records in the table.
KR1020110077900A 2011-08-04 2011-08-04 Partition scan method and device, memory system, and data alignment method using partial index rid alignment KR101311409B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020110077900A KR101311409B1 (en) 2011-08-04 2011-08-04 Partition scan method and device, memory system, and data alignment method using partial index rid alignment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020110077900A KR101311409B1 (en) 2011-08-04 2011-08-04 Partition scan method and device, memory system, and data alignment method using partial index rid alignment

Publications (2)

Publication Number Publication Date
KR20130015731A KR20130015731A (en) 2013-02-14
KR101311409B1 true KR101311409B1 (en) 2013-09-25

Family

ID=47895483

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020110077900A KR101311409B1 (en) 2011-08-04 2011-08-04 Partition scan method and device, memory system, and data alignment method using partial index rid alignment

Country Status (1)

Country Link
KR (1) KR101311409B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101565528B1 (en) 2014-05-16 2015-11-03 (주)케이사인 Delta indexing system and method of operating delta indexing system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001331353A (en) 2000-05-22 2001-11-30 Teijin Ltd Data input system to database, and recording medium in which its program is stored

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001331353A (en) 2000-05-22 2001-11-30 Teijin Ltd Data input system to database, and recording medium in which its program is stored

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Revisiting Sorted Index Scan with flash SSDs", 성균관대학교 석사학위논문, 이재효, 2011.2 *
"플래시 메모리 환경을 위한 이단계 인덱싱 방법", 정보과학회논문지 제14권 7호, 2008년 10월, pp.713-717, 김종대, 장지웅, 황규정, 김상욱. *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101565528B1 (en) 2014-05-16 2015-11-03 (주)케이사인 Delta indexing system and method of operating delta indexing system

Also Published As

Publication number Publication date
KR20130015731A (en) 2013-02-14

Similar Documents

Publication Publication Date Title
CN100458779C (en) Index and its extending and searching method
US9805077B2 (en) Method and system for optimizing data access in a database using multi-class objects
US8108355B2 (en) Providing a partially sorted index
US10762071B2 (en) Value-ID-based sorting in column-store databases
US8666971B2 (en) Intelligent adaptive index density in a database management system
US9569490B1 (en) MIN/MAX query with synopsis guided scan order
US8566333B2 (en) Multiple sparse index intelligent table organization
US10963440B2 (en) Fast incremental column store data loading
CN110109910A (en) Data processing method and system, electronic equipment and computer readable storage medium
US20150186453A1 (en) Tiered index management
US10055442B2 (en) Efficient updates in non-clustered column stores
KR101806394B1 (en) A data processing method having a structure of the cache index specified to the transaction in a mobile environment dbms
JPWO2012164738A1 (en) Database management system, apparatus and method
US11520763B2 (en) Automated optimization for in-memory data structures of column store databases
Athanassoulis et al. Online updates on data warehouses via judicious use of solid-state storage
Han et al. Efficient top-k retrieval on massive data
KR101311409B1 (en) Partition scan method and device, memory system, and data alignment method using partial index rid alignment
US20060085464A1 (en) Method and system for providing referential integrity constraints
KR100892406B1 (en) Method for Searching Information and System Therefor
Xu et al. Efficiently answer top-k queries on typed intervals
KR101642072B1 (en) Method and Apparatus for Hybrid storage
Olken Physical database support for scientific and statistical database management
Kim et al. Speedy browsing and sampling with needletail
Macyna et al. Flash-aware Clustered Index for Mobile Databases
Luo et al. MoonKV: Optimizing Update-intensive Workloads for NVM-based Key-value Stores

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20160607

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20170703

Year of fee payment: 5

LAPS Lapse due to unpaid annual fee