JP6479186B2 - 計算機システム及びデータベース管理方法 - Google Patents
計算機システム及びデータベース管理方法 Download PDFInfo
- Publication number
- JP6479186B2 JP6479186B2 JP2017529176A JP2017529176A JP6479186B2 JP 6479186 B2 JP6479186 B2 JP 6479186B2 JP 2017529176 A JP2017529176 A JP 2017529176A JP 2017529176 A JP2017529176 A JP 2017529176A JP 6479186 B2 JP6479186 B2 JP 6479186B2
- Authority
- JP
- Japan
- Prior art keywords
- log
- index
- buffer
- thread
- page
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2358—Change logging, detection, and notification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2228—Indexing structures
- G06F16/2246—Trees, e.g. B+trees
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5016—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1471—Saving, restoring, recovering or retrying involving logging of persistent data for recovery
Description
(−)ログバッファ毎に1以上のログファイルが存在してよい。ログファイルは、DBサーバの外部記憶デバイスに存在してもよいし、DBサーバ内のメモリに存在してもよい。(−)複数のDB領域及び複数のログ領域がある。複数のDB領域は、複数のデータ領域及び複数のインデクス領域を含む。いずれの領域も論理領域である。データ領域内のデータは、DBテーブルに書き込まれるデータであり、インデクス領域内のデータは、インデクスに書き込まれるデータであり、ログ領域内のログは、ログファイルに書き込まれるデータである。少なくともデータ領域及びインデクス領域の各々が、1以上のページの集合である。以下、データ領域及びインデクス領域は、いずれも1つのページであるとする。故に、以下、データ領域を「データページ」と言い、インデクス領域を「インデクスページ」と言う。また、以下、データページ及びインデクスページを「DBページ」と総称することがある。DBページは、DB領域の一例である。また、ログ領域はログファイルであるとする。
(−)DBページの更新としては、論理的な更新と物理的な更新があってよい。論理的な更新とは、DBページへのデータがバッファに書き込まれることでよい。物理的な更新とは、ページ書込みのことでよい。ページ書込みとは、バッファ内のデータ(特に、DBページに実際に書き込まれていないデータであるダーティデータ)が実際にDBページに書き込まれることである。ページ書込みは、ページ単位で行われてよい。
(−)1以上のデータページが更新されると、複数のスレッドにより1以上のインデクスページが更新される。DBテーブルが更新されればインデクスの更新も必要になるからである。
(−)1つのインデクスページにつき複数のインデクスログが複数のログバッファに書き込まれることがある。なぜなら、複数のデータページの更新により更新されるインデクスページが共通していることがあるからである。
(−)インデクスページのページ書込みの前に、そのインデクスページに関わるインデクスログがログファイルに書き込まれる(WAL(Write Ahead Logging))。なぜなら、コミット処理完了前に障害が発生した場合には、再起動後にログを用いたロールバックによりデータをページ書込み前の状態に復元できるようにするためである。
Unit))を含んでおり、更に、専用ハードウェア(例えばASIC(Application Specific Integrated Circuit)又はFPGA(Field-Programmable GateArray))を含んでもよい。また、これら機能部を主語として開示された処理は、計算機が行う処理としてもよい。また、これら機能部の一部または全ては、専用ハードウェアによって実現されてもよい。また、各種機能部は、プログラム配布サーバや、計算機が読み取り可能な記憶媒体によって各計算機にインストールされてもよい。また,各種機能部及びサーバは1つの計算機にインストールされ実行されても良いし,複数の計算機にインストールされ実行されても良い。プロセッサは、制御部の一例であり、処理の一部または全部を行うハードウェア回路を含んでもよい。プログラムは、プログラムソースから計算機のような装置にインストールされてもよい。プログラムソースは、例えば、プログラム配布サーバまたは計算機が読み取り可能な記憶メディアであってもよい。プログラムソースがプログラム配布サーバの場合、プログラム配布サーバはプロセッサ(例えばCPU)と記憶部を含み、記憶部はさらに配布プログラムと配布対象であるプログラムとを記憶してよい。そして、プログラム配布サーバのプロセッサが配布プログラムを実行することで、プログラム配布サーバのプロセッサは配布対象のプログラムを他の計算機に配布してよい。また、以下の説明において、2以上のプログラムが1つのプログラムとして実現されてもよいし、1つのプログラムが2以上のプログラムとして実現されてもよい。
Claims (13)
- データベースを管理する計算機システムであって、
複数のスレッドを並列に実行する複数のプロセッサコアを有するプロセッサと、
2以上の専有ログバッファと2以上の共有ログバッファとを有する記憶部と
を有し、
前記プロセッサが、
(A)前記データベースに対応した複数のデータベース領域のうち2以上のスレッドにより更新され得ないデータベース領域を更新するスレッドについて、そのデータベース領域の更新に関するログの書込み先のログバッファとして、いずれかの専有ログバッファを選択し、
(B)前記複数のデータベース領域のうち2以上のスレッドにより更新され得るデータベース領域を更新するスレッドについて、そのデータベース領域の更新に関するログの書込み先のログバッファとして、いずれかの共有ログバッファを選択し、
各専有ログバッファは、1つのスレッドの1以上のログが存在し得るが2以上のスレッドの2以上のログが混在し得ないログバッファであり、
各共有ログバッファは、2以上のスレッドの2以上のログが混在し得るログバッファである、
計算機システム。 - 複数の専有ログバッファの各々が、前記複数のスレッドのいずれかに割り当てられており、
前記プロセッサが、(A)において、そのスレッドに割り当てられている専有ログバッファを選択する、
請求項1記載の計算機システム。 - 複数の共有ログバッファの各々が、前記複数のスレッドのいずれかに割り当てられており、
前記プロセッサが、(B)において、複数の共有ログバッファのうちのいずれかの共有ログバッファを選択する、
請求項2記載の計算機システム。 - 前記データベースは、テーブルとインデクスとを含み、
前記複数のデータベース領域は、複数のデータ領域と、複数のインデクス領域とを含み、
前記複数のデータ領域の各々は、テーブルのデータを含んだデータベース領域であり、
前記複数のインデクス領域の各々は、インデクスのデータを含んだデータベース領域であり、
2以上のスレッドにより更新され得るデータベース領域は、インデクス領域である、
請求項3記載の計算機システム。 - (B)で選択された共有ログバッファは、更新対象のインデクス領域を基に選択された共有ログバッファである、
請求項4記載の計算機システム。 - 前記インデクスは、木構造のインデクス領域で構成されたB木構造のインデクスであり、
前記インデクスについてスプリットが行われた場合、(B)で選択された共有ログバッファは、全ての更新対象のリーフインデクス領域に接続されたいずれかの上位インデクス領域を基に選択された共有ログバッファである、
請求項5記載の計算機システム。 - 前記いずれかの上位インデクス領域は、前記全ての更新対象インデクス領域のうちの最上位のインデクス領域である、
請求項6記載の計算機システム。 - (B)で選択された共有ログバッファは、対象のインデクス領域の番号と共有ログバッファの数とを用いて一意に特定された共有ログバッファである、
請求項5記載の計算機システム。 - 前記複数のスレッドにそれぞれ複数のログ領域も割り当てられており、
前記複数のスレッドの各々が、そのスレッドに割り当てられている専有ログバッファ及び共有ログバッファ内のログを、そのスレッドに割り当てられているログ領域に書き込む、
請求項4記載の計算機システム。 - 前記複数のデータ領域の各々には、いずれかのスレッドが割り当てられており、
少なくとも1つのデータ領域が割り当てられているスレッドは、そのスレッドに割り当てられている前記少なくとも1つのデータ領域を更新し得るが、そのスレッドに割り当てられていないデータ領域を更新しないようになっており、
前記複数のインデクス領域の各々は、2以上のスレッドにより更新され得る、
請求項4記載の計算機システム。 - 前記複数のスレッドの各々が、データ領域及びインデクス領域のいずれも更新し得るスレッドであり、
前記プロセッサが、
更新対象のデータベース領域がインデクス領域であるか否かを判断し、
前記判断の結果が否定の場合、(A)の処理を実行し、
前記判断の結果が肯定の場合、(B)の処理を実行する、
請求項10記載の計算機システム。 - 前記プロセッサが、(B)において、前記選択された共有ログバッファのロックを取得してから、前記選択された共有ログバッファにログを書き込むようになっており、
前記プロセッサが、(B)において、前記選択された共有ログバッファのロックを取得できない場合、そのスレッドに対応した専有ログバッファにログを書き込む、
請求項1記載の計算機システム。 - データベースを管理するデータベース管理方法であって、
(A)前記データベースに対応した複数のデータベース領域のうち2以上のスレッドにより更新され得ないデータベース領域を更新するスレッドについて、そのデータベース領域の更新に関するログの書込み先のログバッファとして、2以上の専有ログバッファのうちのいずれかの専有ログバッファを選択し、
(B)前記複数のデータベース領域のうち2以上のスレッドにより更新され得るデータベース領域を更新するスレッドについて、そのデータベース領域の更新に関するログの書込み先のログバッファとして、2以上の共有ログバッファのうちのいずれかの共有ログバッファを選択し、
各専有ログバッファは、1つのスレッドの1以上のログが存在し得るが2以上のスレッドの2以上のログが混在し得ないログバッファであり、
各共有ログバッファは、2以上のスレッドの2以上のログが混在し得るログバッファである、
データベース管理方法。
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2015/070503 WO2017013701A1 (ja) | 2015-07-17 | 2015-07-17 | 計算機システム及びデータベース管理方法 |
Publications (2)
Publication Number | Publication Date |
---|---|
JPWO2017013701A1 JPWO2017013701A1 (ja) | 2018-03-22 |
JP6479186B2 true JP6479186B2 (ja) | 2019-03-06 |
Family
ID=57835307
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017529176A Active JP6479186B2 (ja) | 2015-07-17 | 2015-07-17 | 計算機システム及びデータベース管理方法 |
Country Status (3)
Country | Link |
---|---|
US (1) | US11321302B2 (ja) |
JP (1) | JP6479186B2 (ja) |
WO (1) | WO2017013701A1 (ja) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10108422B2 (en) * | 2015-04-28 | 2018-10-23 | Liqid Inc. | Multi-thread network stack buffering of data frames |
US20180300083A1 (en) * | 2017-04-12 | 2018-10-18 | Hewlett Packard Enterprise Development Lp | Write-ahead logging through a plurality of logging buffers using nvm |
US11196567B2 (en) | 2018-11-26 | 2021-12-07 | Amazon Technologies, Inc. | Cryptographic verification of database transactions |
US10942910B1 (en) | 2018-11-26 | 2021-03-09 | Amazon Technologies, Inc. | Journal queries of a ledger-based database |
US11119998B1 (en) | 2018-11-26 | 2021-09-14 | Amazon Technologies, Inc. | Index and view updates in a ledger-based database |
US11036708B2 (en) | 2018-11-26 | 2021-06-15 | Amazon Technologies, Inc. | Indexes on non-materialized views |
CN109977334B (zh) * | 2019-03-26 | 2023-10-20 | 浙江度衍信息技术有限公司 | 检索速度优化方法 |
CN111061690B (zh) * | 2019-11-22 | 2023-08-22 | 武汉达梦数据库股份有限公司 | 一种基于rac的数据库日志文件读取方法和装置 |
US20230010516A1 (en) * | 2021-07-06 | 2023-01-12 | Vmware, Inc. | Input/output (i/o) quiescing for sequential ordering of operations in a write-ahead-log (wal)-based storage system |
Family Cites Families (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05181721A (ja) | 1991-11-25 | 1993-07-23 | Oki Electric Ind Co Ltd | 共有バッファの再利用検索方法 |
US6026406A (en) * | 1997-06-04 | 2000-02-15 | Oracle Corporation | Batch processing of updates to indexes |
US7305421B2 (en) * | 2001-07-16 | 2007-12-04 | Sap Ag | Parallelized redo-only logging and recovery for highly available main memory database systems |
US6721765B2 (en) * | 2002-07-02 | 2004-04-13 | Sybase, Inc. | Database system with improved methods for asynchronous logging of transactions |
US7412460B2 (en) * | 2003-06-19 | 2008-08-12 | International Business Machines Corporation | DBMS backup without suspending updates and corresponding recovery using separately stored log and data files |
WO2009114645A1 (en) * | 2008-03-11 | 2009-09-17 | University Of Washington | Efficient deterministic multiprocessing |
US8229945B2 (en) * | 2008-03-20 | 2012-07-24 | Schooner Information Technology, Inc. | Scalable database management software on a cluster of nodes using a shared-distributed flash memory |
JP5040773B2 (ja) | 2008-03-31 | 2012-10-03 | 富士通株式会社 | メモリバッファ割当装置およびプログラム |
US8489565B2 (en) * | 2009-03-24 | 2013-07-16 | Microsoft Corporation | Dynamic integrated database index management |
US9864772B2 (en) * | 2010-09-30 | 2018-01-09 | International Business Machines Corporation | Log-shipping data replication with early log record fetching |
US8631416B2 (en) * | 2011-03-31 | 2014-01-14 | Verisign, Inc. | Parallelizing scheduler for database commands |
EP2843559A4 (en) | 2012-04-27 | 2016-01-13 | Hitachi Ltd | DATABASE MANAGEMENT SYSTEM, COMPUTERS AND DATABASE MANAGEMENT PROCEDURES |
US8825652B1 (en) | 2012-06-28 | 2014-09-02 | Emc Corporation | Small file aggregation in a parallel computing system |
US9183200B1 (en) * | 2012-08-02 | 2015-11-10 | Symantec Corporation | Scale up deduplication engine via efficient partitioning |
CN103729442B (zh) * | 2013-12-30 | 2017-11-24 | 华为技术有限公司 | 记录事务日志的方法和数据库引擎 |
US9594644B2 (en) * | 2014-09-19 | 2017-03-14 | Sybase, Inc. | Converting a serial transaction schedule to a parallel transaction schedule |
US9613120B1 (en) * | 2014-11-11 | 2017-04-04 | Amazon Technologies, Inc. | Replicated database startup for common database storage |
US9529568B1 (en) * | 2014-12-19 | 2016-12-27 | Amazon Technologies, Inc. | Systems and methods for low interference logging and diagnostics |
-
2015
- 2015-07-17 WO PCT/JP2015/070503 patent/WO2017013701A1/ja active Application Filing
- 2015-07-17 JP JP2017529176A patent/JP6479186B2/ja active Active
- 2015-07-17 US US15/559,175 patent/US11321302B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
US11321302B2 (en) | 2022-05-03 |
JPWO2017013701A1 (ja) | 2018-03-22 |
WO2017013701A1 (ja) | 2017-01-26 |
US20180075080A1 (en) | 2018-03-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6479186B2 (ja) | 計算機システム及びデータベース管理方法 | |
US9672235B2 (en) | Method and system for dynamically partitioning very large database indices on write-once tables | |
US10452491B2 (en) | Scalable log partitioning system | |
US8510316B2 (en) | Database processing system and method | |
US9529881B2 (en) | Difference determination in a database environment | |
US11449507B2 (en) | Database engine | |
US11030196B2 (en) | Method and apparatus for processing join query | |
US8832022B2 (en) | Transaction processing device, transaction processing method and transaction processing program | |
US10366075B2 (en) | Database management system and method | |
US20150331898A1 (en) | Method and apparatus for concurrent access of mixed services | |
US10007548B2 (en) | Transaction system | |
JP6445049B2 (ja) | ログの管理方法及び計算機システム | |
US20150286671A1 (en) | Transaction system | |
WO2015118865A1 (ja) | 情報処理装置、情報処理システム及びデータアクセス方法 | |
US20180349422A1 (en) | Database management system, database server, and database management method | |
EP3242227B1 (en) | Page querying method and data processing node in oltp cluster database | |
US20220342888A1 (en) | Object tagging | |
JP2017167654A (ja) | データ管理装置及びデータベースの管理方法 | |
WO2016117007A1 (ja) | データベースシステム及びデータベース管理方法 | |
US10860577B2 (en) | Search processing system and method for processing search requests involving data transfer amount unknown to host | |
CN110413617B (zh) | 一种根据数据量的大小动态调节哈希表组的方法 | |
US20230273728A1 (en) | Storage control apparatus and method | |
JP6263673B2 (ja) | 計算機システム及びデータベース管理方法 | |
US20170262512A1 (en) | Search processing method, search processing apparatus, and non-transitory computer-readable recording medium storing search processing program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20171201 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20180828 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20181011 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20190115 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20190205 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6479186 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |