WO2012081165A1 - データベース管理装置及びデータベース管理方法 - Google Patents

データベース管理装置及びデータベース管理方法 Download PDF

Info

Publication number
WO2012081165A1
WO2012081165A1 PCT/JP2011/006221 JP2011006221W WO2012081165A1 WO 2012081165 A1 WO2012081165 A1 WO 2012081165A1 JP 2011006221 W JP2011006221 W JP 2011006221W WO 2012081165 A1 WO2012081165 A1 WO 2012081165A1
Authority
WO
WIPO (PCT)
Prior art keywords
index
block
data
access
counter
Prior art date
Application number
PCT/JP2011/006221
Other languages
English (en)
French (fr)
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 JP2012548619A priority Critical patent/JPWO2012081165A1/ja
Priority to US13/994,440 priority patent/US9594785B2/en
Publication of WO2012081165A1 publication Critical patent/WO2012081165A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees

Definitions

  • the present invention relates to a database management technique to which a tree structure index is added.
  • a database is often used for search processing, and one of the most widely used databases is a relational database that manages data in a tabular format.
  • the table has rows and columns, and stores, for example, data related to one transaction in one row.
  • a row is composed of a plurality of columns. For example, date data is stored in one column and sales amount is stored in another column.
  • methods for obtaining the total sales amount on a specific date include full scan and index scan.
  • full scan it is checked whether or not the dates match for all the rows, and the sales of the matching rows are added.
  • index scan rows with the same date are specified by the index, and the total sales amount is obtained from the specified rows.
  • Non-Patent Document 1 describes algorithms for searching using a B-tree, inserting data into the B-tree, and deleting data into the B-tree.
  • Non-Patent Document 2 describes an explanation of a B-tree in ORACLE (registered trademark), a widely used relational database.
  • JP 2008-15810 A JP 2004-295790 A JP 2008-225575 A US Patent Application Publication No. 2008/222090 JP 2009-122850 A JP 2010-140362 A Japanese Patent Application Laid-Open No. 07-200376
  • An object of the present invention is to provide a database management technique for optimizing the performance of a database to which a tree structure index is added.
  • a 1st aspect is related with the database management apparatus which manages the database containing the data block which stores table data.
  • the database management apparatus includes a plurality of tree structures each having at least one index entry for specifying one row data or another index block constituting table data and an access counter. And an access management means for updating each access counter of each of the plurality of index blocks accessed along the tree structure by referring to each index entry according to a data operation on the table data.
  • a second aspect is a database management method for managing a database including a data block for storing table data, and at least one index entry for specifying one row data or another index block constituting the table data, and A computer having a plurality of index blocks each having an access counter refers to each index entry according to a data operation on the table data, and a plurality of indexes accessed along the tree structure by the reference Each access counter of the block is updated.
  • a program that causes a computer to realize the above-described configuration may be used, or a computer-readable recording medium that records this program may be used.
  • FIG. 1 is a conceptual diagram showing a configuration example of a DB system in the first embodiment.
  • FIG. 2 is a diagram conceptually illustrating a configuration example of an index block in the first embodiment.
  • FIG. 3 is a flowchart showing an operation example of the DB system in the first embodiment.
  • FIG. 4 is a diagram conceptually illustrating an example of the relationship between a branch block, a leaf block, and a data block.
  • FIG. 5 is a conceptual diagram showing a configuration example of the DB system in the second embodiment.
  • FIG. 6 is a diagram conceptually illustrating a configuration example of an index block in the second embodiment.
  • FIG. 7 is a flowchart showing an operation example when inserting data in the DB system according to the second embodiment.
  • FIG. 1 is a conceptual diagram showing a configuration example of a DB system in the first embodiment.
  • FIG. 2 is a diagram conceptually illustrating a configuration example of an index block in the first embodiment.
  • FIG. 3 is a flowchart
  • FIG. 8 is a flowchart showing an operation example when deleting data in the DB system according to the second embodiment.
  • FIG. 9 is a conceptual diagram illustrating a configuration example of a DB system according to the third embodiment.
  • FIG. 10 is a diagram conceptually illustrating a configuration example of an index block in the third embodiment.
  • FIG. 11 is a conceptual diagram illustrating a configuration example of the DB system 10 according to the fourth embodiment.
  • the database management apparatus manages a database including data blocks that store table data.
  • the database management apparatus includes a plurality of index blocks each having at least one index entry for specifying one row data or another index block constituting table data, and an access counter, each having a tree structure; Access management means for updating each access counter of a plurality of index blocks accessed along the tree structure by referring to each index entry in accordance with a data operation on the table data.
  • each index block having a tree structure is provided with an access counter, and a plurality of index blocks accessed along the tree structure in response to one data operation on row data in the data block.
  • Each access counter is updated.
  • the database management device it is possible to obtain information on the number of accesses for each index block in a database to which a tree structure index is added.
  • the number of accesses to the index block often occupies a large proportion of the number of accesses to all blocks including the data block and the index block.
  • the index block is normally held on the memory. Access to the index block tends to be a bottleneck due to the speed difference between the CPU (Central Processing Unit) and the memory. Therefore, providing information about access to index blocks is extremely important in optimizing database performance.
  • DB system database system
  • each of the following embodiments is an example of a database system (hereinafter referred to as a DB system) including the configuration of the database management apparatus described above.
  • DB system database system
  • each embodiment given below is an illustration, respectively, and this invention is not limited to the structure of each following embodiment.
  • FIG. 1 is a conceptual diagram illustrating a configuration example of a DB system 10 in the first embodiment.
  • the DB system 10 includes a CPU 1, a memory 2 (RAM (Random Access Memory), ROM (Read Only Memory), hard disk (HDD), etc.), an input / output interface 3 and the like as hardware configurations. .
  • RAM Random Access Memory
  • ROM Read Only Memory
  • HDD hard disk
  • the input / output interface 3 includes a network interface and a user interface for communicating with an external computer or the like.
  • the DB system 10 implements the following processing units, for example, when a program stored in the memory 2 is read and executed by the CPU 1.
  • the DB system 10 includes a database management unit (hereinafter referred to as DB management unit) 100, a database (hereinafter referred to as DB) unit 200, and the like.
  • FIG. 1 shows an example in which the DB system 10 is realized as a single computer, it may be realized by a plurality of computers. Further, in the example of FIG. 1, only one CPU 1 is shown, but it may have a plurality of processors (for example, CPU, DSP (Digital Signal Processor), etc.). For example, the DB management unit 100 and the DB unit 200 may be realized on different computers or CPUs. This embodiment does not limit the hardware configuration of the DB system 10.
  • the DB unit 200 is realized on the memory 2 and includes a plurality of blocks 210 (denoted as 210 (# 1), 210 (# 2), and 210 (#n) in FIG. 1). Each block 210 is secured as a continuous storage area having a predetermined capacity (for example, 4 kilobytes (KB)). The space between the blocks 210 may be secured as a continuous area, or may be secured as each non-continuous area. In the present embodiment, the area size of the block 210 is not limited.
  • Each block 210 is roughly divided into a block for storing an index (hereinafter also referred to as an index block) and a block for storing data (hereinafter also referred to as a data block) 240.
  • the data block 240 stores an arbitrary table (table).
  • the index block has a tree structure (for example, a B-tree (balanced tree) structure), and is further roughly divided into a branch block 220 and a leaf block 230.
  • Each of the branch block 220 and the leaf block 230 stores at least one entry serving as an index.
  • the entry stored in each index block can also be called an index entry.
  • the index entry includes a key value to be searched and an identifier (ID).
  • the leaf block 230 is the lowest layer block in the index block.
  • the identifier included in the entry of the leaf block is data for specifying any one row data of the data block.
  • the identifier is composed of, for example, a pointer pointing to the head of the row data to be specified and the size of the row data.
  • the branch block 220 is a block having a link to the leaf block 230 or another branch block 220. This link is realized by the identifier of the index entry. That is, the identifier included in the entry of the branch block 220 is a pointer that specifies any one branch block 220 or any one leaf block 230.
  • the highest branch block 220 may be referred to as a root block.
  • the highest level means that the search is first performed during the search.
  • the branch block 220 including the index entry is referred to as a parent block
  • the leaf block 230 or other branch block 220 specified by the identifier of the index entry is a child.
  • a block sometimes referred to as a block.
  • FIG. 2 is a diagram conceptually illustrating a configuration example of an index block in the first embodiment.
  • each index block includes a block header and at least one index entry.
  • the index entry includes a key value (“key” in FIG. 2) and an identifier (“id” in FIG. 2).
  • key in FIG. 2
  • identifier in FIG. 2.
  • the block header a block type, an access counter and the like are set.
  • the block type is information for identifying a leaf block, a branch block, and the like.
  • the access counter counts the number of accesses to the index block.
  • FIG. 2 shows an example in which each value and each entry in the block header are stored in a continuous area in the index block. However, if each value and each entry in the block header are associated with each other, However, they are not necessarily stored in a continuous area.
  • the DB management unit 100 includes an access management unit 110, a search unit 120, and the like. Each of these processing units constituting the DB management unit 100 is also realized as a software element by the CPU 1 reading and executing a program stored in the memory 2.
  • the search unit 120 acquires a search key, and extracts a row including data of a column (field) corresponding to the search key from the data block 240.
  • the search key may be acquired from another device via communication, may be acquired from another processing unit such as a process executed by the CPU 1, or may be input by a user via a user interface. May be.
  • the search unit 120 performs an index search in order to specify a row to be extracted in the data block 240.
  • this index search the search unit 120 first accesses the root block.
  • the search unit 120 searches for an entry having a maximum key value equal to or smaller than the search key or an entry having a minimum key value equal to or larger than the search key among the entries included in the root block.
  • the search unit 120 reads another branch block 220 or leaf block 230 specified by the identifier of the extracted entry.
  • the search unit 120 extracts a specific entry in the same manner as the search for the root block.
  • the search unit 120 extracts an entry that satisfies the search key condition, and extracts row data specified by the identifier of the entry from the data block 240.
  • the access management unit 110 operates in accordance with an instruction from the search unit 120 and increases the access counter of the block header of the target index block. Specifically, when the search unit 120 reads the branch block 220 or the leaf block 230 specified by the identifier of the index entry by performing an index search, the access management unit 110 reads the block of the read index block. Increase the header access counter. However, since the root block is a block that is referred to first, the search unit 120 increases the access counter of the block header of the root block when accessed.
  • the access management unit 110 increments the access counter of the branch block 220 by one. Further, the access management unit 110 increments the access counter of the leaf block 230 by 1 when the search unit 120 accesses the leaf block 230 traced from the branch block 220.
  • FIG. 3 is a flowchart showing an operation example of the DB system 10 in the first embodiment.
  • FIG. 4 is a diagram conceptually illustrating an example of the relationship between the branch block 220, the leaf block 230, and the data block 240.
  • the search unit 120 takes as an example a case of searching for a row including the search key “go” in the column data. The operation example will be described.
  • the search unit 120 When the search unit 120 obtains the search key, it first reads the route block (S10). In the example of FIG. 4, when the search unit 120 acquires the search key “go”, the search unit 120 reads a root block having index entries including key values “e”, “m”, and “t”.
  • the access management unit 110 increments the access counter of the route block by 1 (S11).
  • the search unit 120 identifies an entry having a maximum key value less than or equal to the search key or an entry having the minimum key value equal to or greater than the search key among the index entries in the root block. Since any general method does not lose generality, here, the search unit 120 specifies an entry having the maximum key value equal to or less than the search key (S12). This entry specification may be realized by comparing all the entries in the block, or may be realized by comparing some entries after sorting the entries in the block by the key value. .
  • the search unit 120 reads the index block specified by the identifier of the entry specified as such (S13).
  • the access management unit 110 increments the access counter of the index block by 1 (S14).
  • the search unit 120 determines whether the read index block is the leaf block 230 or the branch block 220 based on the block type set in the block header (S15). When the read index block is the branch block 220 (S15; NO), the search unit 120 and the access management unit 110 relate to the read branch block 220 (S12), (S13), and The process of (S14) is executed.
  • the search unit 120 matches the search condition including the search key from the entries in the read leaf block 230.
  • the entry to be specified is specified (S16).
  • the search condition indicates a search for a row (complete match) including the search key in the column data.
  • an index entry including the key value “go” is specified.
  • the identification of the index entry may be realized by comparing all the entries in the leaf block 230, or by comparing some entries after sorting the entries in the leaf block 230 by the key value. It may be realized.
  • the search unit 120 extracts the row data specified by the identifier included in the specified index entry (S17).
  • the row of the data block 240 specified by the identifier of the index entry including the key value “go” is extracted.
  • the head of the row data is specified by the pointer included in the identifier, and data corresponding to the size of the row (number of bytes) is read from the head address.
  • the index block included in the search path traced until at least one row data of the data block 240 is extracted according to the index search along the tree structure by the search unit 120.
  • Each access counter is updated by the access management unit 110.
  • the number of accesses to the branch block 220 and the leaf block 230 is recorded for each block at the time of search. Therefore, the access load for each block is referred to by referring to the access counter of each index block. Can be easily estimated. If the access load of each block can be estimated, the performance of the database can be optimized, for example, by determining an index block to be placed in the CPU cache according to the load.
  • the number of accesses to the data block 240 is not counted. This is because the number of accesses per block in the data block 240 is smaller than that of the index block.
  • the number of accesses to an index block is counted as information that is particularly useful for optimizing database performance. In this way, in the first embodiment, the load used in the access count process is minimized.
  • the number of accesses to the data block 240 may be counted.
  • FIG. 5 is a conceptual diagram showing a configuration example of the DB system 10 in the second embodiment.
  • the DB system 10 in the second embodiment further includes a data insertion unit 130 and a data deletion unit 140 in addition to the configuration of the first embodiment.
  • the DB system 10 in the second embodiment will be described focusing on the contents different from the first embodiment, and the description of the same contents as in the first embodiment will be omitted as appropriate.
  • the data insertion unit 130 and the data deletion unit 140 are also realized as software elements by the CPU 1 reading and executing a program stored in the memory 2.
  • the data insertion unit 130 receives the row data to be inserted and writes the row data in the data block 240. At this time, the data insertion unit 130 updates the index in the index block based on the inserted row data. For example, the data block 240 is written in any one of the blocks having an empty area larger than the row data to be inserted.
  • the data insertion unit 130 adds a new index entry corresponding to the inserted row data to at least the corresponding leaf block 230.
  • This new index entry includes column data included in the inserted row, which is a column in which a key is set, as a key value, and further includes an identifier for specifying the row.
  • the index may be required to add a new index entry to the branch block 220 in addition to adding an entry to the leaf block 230. This is a case where there is not enough free space for adding a new index entry in the leaf block 230 to be inserted (when overflow occurs).
  • the data insertion unit 130 creates a free area by performing block division.
  • the data insertion unit 130 creates a free area by moving a part of the data of the leaf block 230 in which the free area of a predetermined capacity has disappeared to the newly secured leaf block 230.
  • Block division is similarly processed not only in the leaf block 230 but also in the branch block 220. Details of the block division will be described in detail in the operation example section.
  • the data deletion unit 140 receives a value for specifying the row data to be deleted, deletes the row data from the data block 240, and deletes the index entry corresponding to the deleted row data from the leaf block 230. For example, a value for specifying the row data to be deleted is acquired as a result of the search process of the search unit 120.
  • the data deletion unit 140 makes the leaf block 230 an empty block. .
  • the processing when this underflow occurs will be described in detail in the section of the operation example.
  • FIG. 6 is a diagram conceptually illustrating a configuration example of an index block in the second embodiment.
  • a read counter and a write counter are provided as access counters.
  • the read counter counts the number of read accesses
  • the write counter counts the number of write accesses (including entry deletion).
  • the access management unit 110 in the second embodiment increases the read counter at the time of data search described in the first embodiment. Furthermore, when a new index entry is added by the data insertion unit 130 when row data is inserted, the access management unit 110 increments the write counter of the index block to which the index entry is added by one. At this time, the access management unit 110 increments the read counter of each index block accessed by 1 until the index block to which the index entry is added is searched.
  • the access management unit 110 increments the read counter of the index block accessed in the block division processing, and moves the entry in the block division processing. Each time, the write counter of the destination index block is incremented by one.
  • the access management unit 110 increases the write counter of the index block. Further, when the data deletion unit 140 makes the index block an empty block, the access management unit 110 writes the write counter of another index block that is the destination of the entry moved to make the index block an empty block. Increase.
  • FIG. 7 is a flowchart illustrating an operation example when inserting data in the DB system 10 according to the second embodiment.
  • the data insertion unit 130 When the data insertion unit 130 acquires the row data to be inserted, the data insertion unit 130 writes the row data in an arbitrary data block 240 having a free area (S20).
  • the data insertion unit 130 specifies the leaf block 230 into which the index entry corresponding to the inserted row data is to be inserted (S21).
  • the specification of the leaf block 230 is realized by the same method as that for specifying the leaf block 230 by index search using the value of the column in which the key in the inserted row data is set as the search key.
  • the leaf block 230 to be inserted is specified by executing the processes of S10, S11, S12, S13, S14, and S15.
  • the access management unit 110 counts up the read counter of the index block read to identify the leaf block 230 corresponding to the inserted row data.
  • the data insertion unit 130 generates a new index entry to be inserted into the identified leaf block 230 (S22).
  • the new index entry includes the value of the column in which the key in the inserted row data is set as the key value, and includes an identifier for specifying the inserted row data.
  • the data insertion unit 130 determines whether or not the identified leaf block 230 overflows due to the addition of a new index entry (S23).
  • overflow means that when a new index entry is added, the free area of the block falls below a predetermined ratio.
  • the data insertion unit 130 determines that there is no overflow (S23; NO)
  • it writes the newly generated index entry in the identified leaf block 230 (S24).
  • the access management unit 110 increments the write counter of the written leaf block 230 by 1 (S25).
  • the data insertion unit 130 determines whether or not block division has been performed (S26). If the block is not divided (S26; NO), the data insertion unit 130 terminates the processing. If the block is divided (S26; YES), the data insertion unit 130 is placed at the upper level of the block that has been divided. A branch block is specified (S27). The identification of the upper branch block may be realized by performing recursive function processing, or may be realized by storing the identifier of the upper block in the block header.
  • the data insertion unit 130 returns to the process (S22) with the identified upper branch block as the target block and executes each process.
  • the data insertion unit 130 determines that an overflow occurs (S23; YES)
  • the data insertion unit 130 performs block division processing on the identified block. In this process, first, the data insertion unit 130 determines whether or not the block determined to overflow is the root block (S30).
  • the data insertion unit 130 acquires a new empty block for making a new root block (S31). At this time, the access management unit 110 increments the read counter of the acquired empty block by 1 (S32).
  • the data insertion unit 130 generates an index entry including the minimum key value in the current root block determined to overflow and an identifier for specifying the current root block (S33).
  • the data insertion unit 130 writes the index entry generated in this way into the empty block acquired to make a new root block (S34). In other words, the generated index entry becomes data for linking from the new root block to the original root block (subsequent branch block).
  • the access management unit 110 increments the write counter of the block in which the index entry is written by 1 (S35).
  • the data insertion unit 130 changes the root block (S36). Specifically, the data insertion unit 130 changes the root block to the newly acquired block from the original root block determined to overflow. For example, this change is realized by changing the block type of the block header.
  • the data insertion unit 130 further acquires an empty block (S37).
  • the data insertion unit 130 determines an entry to be moved in the block determined to overflow, and sequentially moves each determined entry to the acquired empty block (S38).
  • the data insertion unit 130 holds a threshold value in advance, and determines an entry having a key value equal to or greater than the threshold value as a moving entry among entries of a block determined to overflow.
  • the threshold value a value smaller than the key value of one or more entries such as a median value is used.
  • the access management unit 110 increments the free block write counter by 1 each time the entry is moved to the free block (S39).
  • the data insertion unit 130 writes the index entry generated in the process (S22) in a free area created by the entry movement (S24).
  • the data insertion unit 130 and the access management unit 110 execute each process after the above-described process (S25).
  • FIG. 8 is a flowchart showing an operation example when deleting data in the DB system 10 in the second embodiment.
  • the data deletion unit 140 receives a value for specifying the row data to be deleted, and deletes the row data from the data block 240 (S40).
  • the deletion of the row data may be realized by deleting the row data, or may be realized by adding a value indicating invalidity to the row data.
  • the data deleting unit 140 specifies the leaf block 230 having an index entry that specifies the deleted row data (S41).
  • the specification of the leaf block 230 is realized by the same method as that for specifying the leaf block 230 by index search using the value of the column in which the key in the deleted row data is set as a search key. According to the operation example of FIG. 3, the leaf block 230 is specified by executing the processes of S10, S11, S12, S13, S14, and S15.
  • the data deletion unit 140 deletes the index entry corresponding to the deleted row data in the identified leaf block 230 (S42). At this time, the access management unit 110 increments the write counter of the leaf block 230 from which the index entry has been deleted (S43).
  • the data deletion unit 140 determines whether or not the leaf block 230 underflows by deleting the entry (S44). If no underflow has occurred (S44; NO), the data deletion unit 140 ends the process.
  • the data deletion unit 140 moves the entry remaining in the leaf block 230 that has been determined to underflow to another leaf block 230, leaving the leaf block 230 empty. Block (S45). At this time, the access management unit 110 increments the write counter of the previous leaf block 230 to which the entry has been moved (S46).
  • the data deletion unit 140 sets the access counter (read counter and write counter) of the leaf block 230 that has become an empty block to 0. By making it an empty block, this block is reused by the data insertion unit 130.
  • the access counters of the leaf blocks 230 that have been made free blocks may be added to the access counters of the destination blocks.
  • the data deletion unit 140 determines whether or not block integration is possible (S47). Specifically, the data deleting unit 140 determines whether or not all entries of all child blocks hanging on the parent block of the empty block can be entered in the parent block (S47).
  • the data deleting unit 140 determines that block integration is impossible (S47; NO)
  • the process is terminated.
  • the data deletion unit 140 integrates these blocks (S48). That is, the entries existing in the parent block are deleted while moving all the entries of the child block to the parent block. As a result, all the child blocks hanging on the parent block are made free blocks.
  • the access management unit 110 increases the write counter of the upper block by 1 (S49).
  • the access counter value of the child block to be integrated may be added to the access counter of the parent block.
  • the read counter of each index block referred in the index search for specifying the leaf block 230 to which the index entry is to be added is updated. Further, when block division occurs due to the insertion of the row data, the read counter of the newly acquired empty block is updated, and the write counter of the block is sequentially updated every time the entry is moved.
  • the index entry corresponding to the row data is deleted from the leaf block 230 and the write of the leaf block 230 from which the index entry is deleted.
  • the counter is updated. Furthermore, when it is determined that the leaf block 230 underflows due to entry deletion, the write counter of the leaf block 230 that is the destination of the entry that has been moved along with the empty block is updated. Further, even when the blocks are integrated, the write counter of the upper block to be integrated is updated.
  • the number of accesses to each block can be managed separately for read and write.
  • the read access and the write access have different loads even in the same one access. This is because there is a difference in time required for access, and different types of locks must be applied.
  • the second embodiment it is possible to provide more useful information for optimizing the database performance by managing the access count information for each access type for each index block. According to such information, it is possible to accurately estimate an access load, a bias of access to a child block, and the like in each index block. Can also be specified.
  • each index block managed in the second embodiment it can be determined whether or not an index should be added in units of rows.
  • the search is speeded up, but an index operation is required at the time of update, so efficiency is lowered.
  • it can be determined that it is more efficient not to add an index to the row specified by the entry of the index block in which the number of write counters is greater than the predetermined number.
  • the access counter of each block is managed by distinguishing the storage area in which each block is stored.
  • the DB system 10 according to the third embodiment will be described focusing on the contents different from the above-described embodiments, and description of the same contents as those of the above-described embodiments will be appropriately omitted.
  • FIG. 9 is a conceptual diagram illustrating a configuration example of the DB system 10 according to the third embodiment.
  • a plurality of storage areas (storage area A300 and storage area B400) are distinguished.
  • the storage area A300 is realized on a memory device with a high access speed included in the memory 2
  • the storage area B400 is realized on a memory device with a lower access speed than the storage area A300 included in the memory 2.
  • the storage area A300 is realized on primary storage
  • the storage area B400 is realized on secondary storage such as a hard disk.
  • the method of distinguishing storage areas is not limited to such a form, and may be distinguished for each type of storage device such as a CPU cache, flash memory, hard disk, or the like.
  • the DB system 10 in the third embodiment further includes a storage area management unit 150 in addition to the configuration of the second embodiment.
  • the storage area management unit 150 is also realized as a software element by the CPU 1 reading and executing a program stored in the memory 2.
  • the storage area management unit 150 manages the distinguished storage areas A300 and B400.
  • the storage area A300 is treated as a cache, and all of the DB unit 200 is stored in the storage area B400.
  • the storage area management unit 150 controls the search unit 120, the data insertion unit 130, and the data deletion unit 140 to perform processing without distinguishing these storage areas.
  • the storage area management unit 150 stores a copy of some blocks of the DB unit 200 in the storage area B400 in the storage area A300. Note that this memory control by the storage area management unit 150 may be performed using a well-known cache technique, and thus detailed description thereof is omitted here.
  • FIG. 10 is a diagram conceptually illustrating a configuration example of an index block in the third embodiment.
  • a pair of a write counter and a read counter is provided for each storage area as an access counter.
  • the write counter A and the read counter A count accesses (cache hits) of the blocks stored in the storage area A300, and the write counter B and the read counter B are copied from the storage area B400 because they are not in the storage area A300. Counts accesses to cached blocks (cache miss).
  • the access management unit 110 distinguishes the storage area of the accessed block and updates the access counter for the distinguished storage area. For example, the access management unit 110 determines in which storage area the block stored is accessed in response to the notification of the occurrence of a cache miss from the storage area management unit 150.
  • the determination method of the type of the memory device is not limited to such a method, and other known determination methods may be used.
  • an access counter is provided for each storage area (memory device), and the access counter corresponding to the storage area in which the index block is stored at the time of access is updated.
  • the access load can be estimated more accurately than in the above embodiments.
  • ar and aw indicate a read load and a write load on the storage area A300
  • arc and awc indicate a read access number and a write access number on the storage area A300
  • br and bw are storage areas.
  • Read load and write load on B400 are shown
  • brc and bwc show the number of read accesses and the number of write accesses on storage area B400.
  • FIG. 11 is a conceptual diagram illustrating a configuration example of the DB system 10 according to the fourth embodiment.
  • the DB system 10 according to the fourth embodiment further includes an access load evaluation unit 310, a row identification unit 320, and an access bias calculation unit 330 in addition to the configuration of the second embodiment.
  • Each of these processing units is also realized as a software element by the CPU 1 reading and executing the program stored in the memory 2.
  • the access load evaluation unit 310 When the access load evaluation unit 310 acquires data for specifying an arbitrary index block, the access load evaluation unit 310 calculates the access load of the index block specified by the data, and outputs information indicating the calculated access load. When calculating the access load, the access load evaluation unit 310 acquires a predetermined read load and a predetermined write load for the identified index block, and reads the access counter from the block header of the index block.
  • the access load evaluation unit 310 calculates a product of a predetermined read load and the number of read accesses and a sum of products of the predetermined write load and the number of write accesses, and outputs the calculated value as an access load.
  • the read load and the write load indicate respective times required for processing one read access and one write access.
  • representative values such as an average value and a median value are stored in the memory 2, and the representative values are used as a read load and a write load.
  • Data for specifying an arbitrary index block may be acquired from another device through communication, may be acquired from another processing unit such as a process executed by the CPU 1, It may be input by the user via the user interface.
  • the access load evaluation unit 310 outputs list data in which pairs of index block identifiers and index block access loads are arranged in descending order of access load without acquiring data for specifying an arbitrary index block. You may do it.
  • the line specifying unit 320 specifies a line that is estimated to be efficient by adding an index. Specifically, the row specifying unit 320 specifies the leaf block 230 in which the ratio of the number of write accesses to the total number of accesses is higher than a predetermined value. The row specifying unit 320 specifies the row specified by each index entry included in the leaf block 230 specified in this way as a row where efficiency cannot be achieved by adding an index.
  • the line specifying unit 320 outputs a list of identifiers for lines that are estimated to be efficient by adding an index.
  • the row specifying unit 320 may execute a process of adding an index only to a row that is estimated to be efficient by adding an index and deleting the index from other rows.
  • the row specifying unit 320 may output a list in which the ratio of the number of write accesses to the total number of accesses is arranged for the number specified in descending order of the ratio.
  • the access bias calculation unit 330 identifies the branch block 220 having a bias in access.
  • the branch block 220 usually has a plurality of child blocks.
  • the bias of access to child blocks can be grasped by using the access counter of each child block. Therefore, the access bias calculation unit 330 specifies a predetermined number of branch blocks 220 that are biased toward specific child blocks and have a large bias with respect to the number of read accesses, the number of write accesses, and the total number of accesses.
  • a calculation method may be used. In such a method, the other value is determined for one value for which the range is specified, (a / x) is calculated for the obtained set, and the maximum value is used as the bias.
  • Information output by the access load evaluation unit 310, the row identification unit 320, and the access bias calculation unit 330 may be sent to another device (computer) via the input / output interface 3, or may be a user such as a display device. It may be output from the interface, or may be stored in the memory 2 in a state stored in a file or the like. This embodiment does not limit the output form of such information.
  • new information that is effective in optimizing the performance of the database is output by using the access counter for each block managed in each of the above-described embodiments.
  • the access load evaluation unit 310 outputs information on the access load of each index block
  • the row specifying unit 320 outputs information on a row that is estimated to be efficient by adding an index.
  • the access bias calculation unit 330 outputs information of the branch block 220 having a bias in access.
  • output information as described above it can be determined whether or not an index should be added in units of rows. This leads to optimization of database performance in consideration of all operations on the database such as search, insertion and deletion.
  • information on access bias and access load information it is possible to optimize database performance such as redesigning the tree structure of index blocks and identifying index blocks that should be preferentially placed in the cache. .
  • branch block 220 or leaf block 230 having a high probability of being accessed next to a certain branch block 220, that is, a block relationship having a high probability of being accessed successively. can do.
  • the processing speed is increased compared to when they are placed in a non-contiguous storage area. can do.
  • the read counter and the write counter are provided as the access counters.
  • the read counter and the write counter may be integrated and managed by one access counter as in the first embodiment.
  • the access counter (including the read counter and the write counter) is incremented by 1. However, the increment may be changed as appropriate according to the access type and the like.
  • each entry included in the index entry in the branch block 220 includes one identifier for identifying any one other branch block 220 or any one leaf block 230.
  • a plurality of identifiers may be included. For example, for an entry having the smallest key value in the branch block 220, an identifier for identifying a child block corresponding to a key value smaller than that key value and a key value greater than that key value than the key values of other entries. An identifier for specifying a child block corresponding to a small key value may be included.
  • each said embodiment uses several flowcharts and each has described several step (process) in order
  • this embodiment is the order of each step in order shown in figure. It is not limited.
  • the order of the illustrated processing steps can be changed within a range that does not hinder the contents.
  • each embodiment and modification which were mentioned above can be combined in the range in which the content does not conflict.
  • a database management apparatus for managing a database including a data block for storing table data, at least one index entry for specifying one row data or another index block constituting the table data, and access A plurality of index blocks each having a tree structure, and each access counter of the plurality of index blocks accessed along the tree structure by referring to each index entry according to the data operation on the table data, respectively An access management means for updating.
  • the database management apparatus according to appendix 1, wherein an access counter of the other index block is increased when accessing another index block.
  • the access counter includes a read counter and a write counter.
  • the access management means increments a write counter of the index block when the data insertion means inserts the new index entry into the index block, and the data insertion means acquires the empty index block.
  • the data insertion means moves at least one of the index entries in the insertion target index block to the empty index block and inserts the new index entry into the insertion target index block.
  • the access management means increments a write counter of the empty index block when the data insertion means moves the at least one index entry to the empty index block.
  • the row data is deleted from the data block, the index entry corresponding to the deleted row data is deleted from the deletion target index block of the plurality of index blocks, and the deletion target index block is deleted.
  • it further comprises data deletion means for moving an index entry remaining in the deletion target index block to another index block, and the access management means is configured to delete the data deletion means.
  • the read load information and the write load information related to the designated index block among the plurality of index blocks are acquired, the product of the read counter of the designated index block and the read load information, and the designated index block
  • the database according to any one of appendices 3 to 5, further comprising access load evaluation means for calculating a sum of products of the write counter and the write load information as an access load of the designated index block Management device.
  • Supplementary Note 8 For each parent index block that stores a plurality of index blocks that specify a plurality of child index blocks, a specific number of accesses to all child index blocks is determined based on an access counter of the plurality of child index blocks. Supplementary note 1 further comprising: an access bias calculating means for calculating the bias of the number of accesses to the child index block and outputting information for identifying a predetermined number of parent index blocks from those having a large bias. 8. The database management device according to any one of 1 to 7.
  • a program for managing a database including a data block for storing table data, at least one index entry for specifying one row data or another index block constituting the table data in the computer, and A plurality of index blocks each having an access counter and having a tree structure and each of the plurality of index blocks accessed along the tree structure by referring to each index entry according to a data operation on the table data
  • the computer is further caused to function as search means for extracting at least one row data in the data block by searching the index entry in each index block along the tree structure, and
  • the access management means increments an access counter of the accessed index block when the search means accesses any one of the plurality of index blocks, and subsequently, an index in the accessed index block.
  • the program according to appendix 10 wherein when accessing another index block specified by an entry, an access counter of the other index block is incremented.
  • the computer inserts new row data into the data block, and sets a new index entry for specifying the row data inserted into the data block as an insertion target index of the plurality of index blocks.
  • the access counter further functions as a data insertion means for obtaining an empty index block.
  • the access management means increases the write counter of the index block when the data insertion means inserts the new index entry into the index block, and the data insertion means When retrieving the index blocks increases the read counter of the empty index block, the program of statement 10 or 11, characterized in that.
  • the data insertion means moves at least one of the index entries in the insertion target index block to the empty index block and inserts the new index entry into the insertion target index block.
  • the access management means increments a write counter of the empty index block when the data insertion means moves the at least one index entry to the empty index block.
  • the computer deletes row data from the data block, deletes an index entry corresponding to the deleted row data from the index block to be deleted among the plurality of index blocks, and When the index block is made an empty block, it further functions as data deleting means for moving the index entry remaining in the index block to be deleted to another index block, and the access management means
  • the means deletes the index entry from the index block to be deleted
  • the write counter of the index block to be deleted is incremented
  • the data deletion means frees the index block to be deleted.
  • the computer acquires the read load information and the write load information related to the designated index block among the plurality of index blocks, the product of the read counter of the designated index block and the read load information, and Any one of appendices 12 to 14, wherein the sum of the product of the write counter of the designated index block and the write load information is further functioned as an access load evaluation means for calculating the access load of the designated index block. Program described in 1.
  • Supplementary note 16 Any one of Supplementary notes 12 to 15, wherein the computer is further caused to function as a row specifying unit that specifies an index block whose write counter occupies the total number of accesses is higher than a predetermined value.
  • a database management method for managing a database including a data block for storing table data, at least one index entry for specifying one row data or another index block constituting the table data, and A computer having a plurality of index blocks each having an access counter and having a tree structure refers to each index entry in accordance with a data operation on the table data, and a plurality of accesses accessed along the tree structure by the reference.

Landscapes

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

Abstract

データベース管理装置は、表データを構成する1つの行データ又は他のインデックスブロックを特定するための少なくとも1つのインデックスエントリ、及び、アクセスカウンタをそれぞれ有し、ツリー構造を持つ複数のインデックスブロックと、表データに対するデータ操作に応じて各インデックスエントリを参照することによりツリー構造に沿ってアクセスされた複数のインデックスブロックの各アクセスカウンタをそれぞれ更新するアクセス管理手段と、を備える。

Description

データベース管理装置及びデータベース管理方法
 本発明は、ツリー構造のインデックスが付加されたデータベースの管理技術に関する。
 大量のデータから少量のデータを高速に検索するために、データにインデックスを付与するのが一般的である。検索処理が多く実行されるのはデータベースであり、最も広く用いられているデータベースの一つは、表形式でデータを管理する関係データベースである。表は、行と列を持ち、例えば、一つの行に一つの取引に関するデータを格納する。行は、複数の列から構成され、例えば、ある列に日付データを、別の列に売上金額を格納する。
 この場合、特定の日付における総売上金額を得る方法には、フルスキャン、インデックススキャン等がある。フルスキャンでは、全ての行に関して日付が一致するかどうかを調べ、一致する行の売上高を加算する。インデックススキャンでは、日付が一致する行をインデックスによって特定し、特定された行から売上高の総和を得る。インデックススキャンは、全行数に比べて日付が一致する行の数が十分に小さいときに効率的である。
 Bツリーは、インデックスを格納するデータ構造の一つとして知られている。例えば、非特許文献1には、Bツリーを使った検索、Bツリーへのデータの挿入、Bツリーへのデータの削除の各アルゴリズムが記載されている。非特許文献2には、広く用いられている関係データベースのORACLE(登録商標)におけるBツリーの説明が記載されている。
 このようなBツリーインデックスを用いることにより、行数をnとすると、「log n」に比例する計算量でデータを検索することができる。なお、フルスキャンの計算量は、nに比例する。
特開2008-15810号公報 特開2004-295790号公報 特開2008‐225575号公報 米国特許出願公開第2008/222090号明細書 特開2009‐122850号公報 特開2010-140362号公報 特開平07-200376号公報
Comer, D. "Ubiquitous B-Tree", ACM Computing Surveys, vol.11, no.2, p.121-137, June 1979 "Oracle Database概要"、10g リリース2、部品番号:B19215-02、2006年3月(図5-7)、http://otndnld.oracle.co.jp/document/products/oracle10g/102/doc_cd/server.102/B19215-02.pdf "Oracle Databaseリファレンス"、10g リリース2、部品番号:B19228-04、2009年6月(図5-7)、http://otndnld.oracle.co.jp/document/products/oracle10g/102/doc_cd/server.102/B19215-02.pdf 木脇高太郎、「おら、オラ、オラクル」、翔泳社、2003年5月(pp. 199) Drepper, U. What Every Programmer Should Know about Memory, November, 2007. http://people.redhat.com/drepper/cpumemory.pdf
 Bツリーインデックスが付加されたデータベースでは、一般的には、検索は高速であるが、データの挿入及び削除は低速になる。Bツリーインデックスが付加されていないデータベースに対するデータの挿入及び削除は、単に表として記録されたデータを操作すればよい。しかしながら、Bツリーインデックスが付加された表に対するデータの挿入及び削除は、Bツリーに記録されたデータも操作しなければならないからである。更に、Bツリーでは、操作を加えるブロックの空き領域の過不足によって、ブロック自体の追加及び削除が発生する場合もある。この場合、そのブロックの上位のブロックのデータも操作する必要がある。
 また、CPU(Central Processing Unit)速度とメモリ速度との差の拡大が、データベースの性能に影響を与えている。特に、ランダムアクセス時のメモリのレイテンシは大きく、メモリ上のデータへのアクセスを待っている間、CPUはストールすることになる。このようなランダムアクセスは、例えば、リストをたどる処理実行時に発生し、Bツリーインデックスが利用されるデータベースにおいては、そのリストをたどる処理が頻繁に発生する。
 このようにデータベースの性能に影響を与える要因は、処理手法、ハードウェア等、様々であるため、現在、データベースの性能を最適化するのは困難となっている。加えて、データベースの性能を最適化するのに有用な情報が存在しないのが現状である。
 本発明の目的は、ツリー構造のインデックスが付加されたデータベースの性能を最適化するためのデータベース管理技術を提供することにある。
 本発明の各態様では、上述した課題を解決するために、それぞれ以下の構成を採用する。
 第1の態様は、表データを格納するデータブロックを含むデータベースを管理するデータベース管理装置に関する。第1の態様に係るデータベース管理装置は、表データを構成する1つの行データ又は他のインデックスブロックを特定するための少なくとも1つのインデックスエントリ、及び、アクセスカウンタをそれぞれ有し、ツリー構造を持つ複数のインデックスブロックと、表データに対するデータ操作に応じて各インデックスエントリを参照することによりツリー構造に沿ってアクセスされた複数のインデックスブロックの各アクセスカウンタをそれぞれ更新するアクセス管理手段と、を備える。
 第2の態様は、表データを格納するデータブロックを含むデータベースを管理するデータベース管理方法において、表データを構成する1つの行データ又は他のインデックスブロックを特定するための少なくとも1つのインデックスエントリ、及び、アクセスカウンタをそれぞれ有し、ツリー構造を持つ複数のインデックスブロックを備えるコンピュータが、表データに対するデータ操作に応じて各インデックスエントリを参照し、その参照によりツリー構造に沿ってアクセスされた複数のインデックスブロックの各アクセスカウンタをそれぞれ更新する。
 なお、本発明の他の態様としては、上記構成をコンピュータに実現させるプログラムであってもよいし、このプログラムを記録したコンピュータが読み取り可能な記録媒体であってもよい。
 上記各態様によれば、ツリー構造のインデックスが付加されたデータベースの性能を最適化するためのデータベース管理技術を提供することができる。
図1は、第1実施形態におけるDBシステムの構成例を示す概念図である。 図2は、第1実施形態におけるインデックスブロックの構成例を概念的に示す図である。 図3は、第1実施形態におけるDBシステムの動作例を示すフローチャートである。 図4は、ブランチブロック、リーフブロック及びデータブロックの関係の例を概念的に示す図である。 図5は、第2実施形態におけるDBシステムの構成例を示す概念図である。 図6は、第2実施形態におけるインデックスブロックの構成例を概念的に示す図である。 図7は、第2実施形態におけるDBシステムのデータ挿入時の動作例を示すフローチャートである。 図8は、第2実施形態におけるDBシステムのデータ削除時の動作例を示すフローチャートである。 図9は、第3実施形態におけるDBシステムの構成例を示す概念図である。 図10は、第3実施形態におけるインデックスブロックの構成例を概念的に示す図である。 図11は、第4実施形態におけるDBシステム10の構成例を示す概念図である。
 以下、本発明の実施の形態について説明する。
 本実施形態に係るデータベース管理装置は、表データを格納するデータブロックを含むデータベースを管理する。このデータベース管理装置は、表データを構成する1つの行データ又は他のインデックスブロックを特定するための少なくとも1つのインデックスエントリ、及び、アクセスカウンタをそれぞれ有し、ツリー構造を持つ複数のインデックスブロックと、上記表データに対するデータ操作に応じて各インデックスエントリを参照することによりツリー構造に沿ってアクセスされた複数のインデックスブロックの各アクセスカウンタをそれぞれ更新するアクセス管理手段と、を備える。
 上記データベース管理装置では、ツリー構造を持つ各インデックスブロックにはアクセスカウンタがそれぞれ設けられており、データブロック内の行データに対する1つのデータ操作に応じてツリー構造に沿ってアクセスされた複数のインデックスブロックの各アクセスカウンタがそれぞれ更新される。
 従って、上記データベース管理装置によれば、ツリー構造のインデックスが付加されたデータベースにおいて、各インデックスブロックに関しアクセスされた回数情報をそれぞれ得ることができる。インデックスブロックへのアクセス回数は、データブロック及びインデックスブロックを含めた全てのブロックへのアクセス回数に対して大きな割合を占めることが多い。インデックスブロックは、通常メモリ上に保持される。そして、CPU(Central Processing Unit)とメモリとの速度差のために、インデックスブロックへのアクセスはボトルネックになりがちである。従って、インデックスブロックへのアクセスに関する情報を提供することは、データベースの性能を最適化する上で極めて重要である。
 以下、上述の実施形態について更に詳細を説明する。以下の各実施形態は、上述のデータベース管理装置の構成を含むデータベースシステム(以降、DBシステムと表記する)の例である。なお、以下に挙げた各実施形態はそれぞれ例示であり、本発明は以下の各実施形態の構成に限定されない。
 [第1実施形態]
 〔システム構成〕
 図1は、第1実施形態におけるDBシステム10の構成例を示す概念図である。DBシステム10は、図1に示すように、ハードウェア構成として、CPU1、メモリ2(RAM(Random Access Memory)、ROM(Read Only Memory)、ハードディスク(HDD)等)、入出力インタフェース3等を有する。これら各ハードウェア要素は例えばバス5により接続される。入出力インタフェース3は、外部のコンピュータ等と通信を行うためのネットワークインタフェースやユーザインタフェース等を含む。
 DBシステム10は、例えば、メモリ2に格納されるプログラムがCPU1により読み出され実行されることにより、以下のような各処理部を実現する。DBシステム10は、データベース管理部(以降、DB管理部と表記する)100、データベース(以降、DBと表記する)部200等を有する。
 なお、図1の例では、DBシステム10が1台のコンピュータとして実現される例を示すが、複数のコンピュータで実現されてもよい。また、図1の例では、1つのCPU1のみが示されるが、複数のプロセッサ(例えば、CPU、DSP(Digital Signal Processor)等)を有していてもよい。例えば、DB管理部100とDB部200とが異なるコンピュータ又はCPU上で実現されてもよい。本実施形態は、DBシステム10のハードウェア構成を限定しない。
 DB部200は、メモリ2上に実現され、複数のブロック210(図1では210(#1)、210(#2)、210(#n)として表記)を含む。各ブロック210は、例えば、所定容量(例えば、4キロバイト(KB))の連続した記憶領域として確保される。ブロック210間は、連続領域として確保されてもよいし、非連続な各領域として確保されてもよい。本実施形態は、ブロック210の領域サイズを限定しない。
 各ブロック210は、インデックスを格納するブロック(以降、インデックスブロックとも表記される)と、データを格納するブロック(以降、データブロックとも表記される)240とに大別される。データブロック240は、任意の表(テーブル)を格納する。
 インデックスブロックは、ツリー構造(例えば、Bツリー(Balanced Tree)構造)を持ち、更に、ブランチブロック220と、リーフブロック230とに大別される。ブランチブロック220及びリーフブロック230の各々は、インデックスとなる少なくとも1つのエントリを格納する。各インデックスブロックに格納されるエントリは、インデックスエントリと呼ぶこともできる。インデックスエントリは、検索対象となるキー値と識別子(ID)とを含む。
 リーフブロック230は、インデックスブロックの中の最下層のブロックである。リーフブロックのエントリに含まれる識別子は、データブロックのいずれか1つの行データを特定するためのデータである。その識別子は、例えば、特定すべき行データの先頭を指すポインタとその行データのサイズとから構成される。
 ブランチブロック220は、リーフブロック230又は他のブランチブロック220へのリンクを持つブロックである。このリンクは、インデックスエントリの識別子によって実現される。即ち、ブランチブロック220のエントリに含まれる識別子は、いずれか1つのブランチブロック220又はいずれか1つのリーフブロック230を特定するポインタである。以降、最上位のブランチブロック220をルートブロックと表記する場合もある。ここで、最上位とは、検索時に最初に検索されることを意味する。
 以降、インデックスエントリの識別子によりリンクされた各インデックスブロックにおいて、そのインデックスエントリを含むブランチブロック220を親ブロックと表記し、そのインデックスエントリの識別子で特定されるリーフブロック230又は他のブランチブロック220を子ブロックと表記する場合もある。
 図2は、第1実施形態におけるインデックスブロックの構成例を概念的に示す図である。図2に示すように、各インデックスブロックは、ブロックヘッダと少なくとも1つのインデックスエントリとをそれぞれ含む。インデックスエントリは、上述したように、キー値(図2の「key」)と識別子(図2の「id」)とを含む。ブロックヘッダには、ブロック種、アクセスカウンタ等が設定される。ブロック種は、リーフブロック、ブランチブロック等を識別するための情報である。アクセスカウンタは、インデックスブロックへのアクセスの数をカウントする。
 図2では、インデックスブロック内の連続領域に、ブロックヘッダ内の各値及び各エントリが格納される例を示したが、ブロックヘッダ内の各値と各エントリとは、相互に関連付けられていれば、必ずしも連続した領域に格納されなくともよい。
 DB管理部100は、アクセス管理部110、検索部120等を含む。DB管理部100を構成するこれら各処理部も、メモリ2に格納されるプログラムがCPU1により読み出され実行されることにより、ソフトウェア要素として実現される。
 検索部120は、検索キーを取得し、この検索キーに対応する列(フィールド)のデータを含む行をデータブロック240から抽出する。検索キーは、他の装置から通信を介して取得されてもよいし、CPU1により実行されているプロセス等のような他の処理部から取得されてもよいし、ユーザインタフェースを介してユーザにより入力されてもよい。
 検索部120は、データブロック240における抽出すべき行を特定するために、インデックス検索を行う。このインデックス検索において、検索部120は、まず、ルートブロックにアクセスする。検索部120は、ルートブロックに含まれるエントリのうち、検索キー以下の最大のキー値を持つエントリ、又は、検索キー以上の最小のキー値を持つエントリを検索する。
 検索部120は、抽出されたエントリの識別子により特定される他のブランチブロック220又はリーフブロック230を読み出す。検索部120は、他のブランチブロック220が読み出された場合には、上記のルートブロックに対する検索と同様に特定のエントリを抽出する。一方、検索部120は、リーフブロック230が読み出された場合には、検索キーの条件を満たすエントリを抽出し、そのエントリの識別子で特定される行データをデータブロック240から抽出する。
 アクセス管理部110は、検索部120からの指示に応じて動作し、対象のインデックスブロックのブロックヘッダのアクセスカウンタを増加させる。具体的には、アクセス管理部110は、検索部120がインデックス検索を行うことによりインデックスエントリの識別子により特定されるブランチブロック220又はリーフブロック230を読み出す際に、その読み出されたインデックスブロックのブロックヘッダのアクセスカウンタを増加させる。但し、ルートブロックは最初に参照されるブロックであるため、検索部120は、アクセスした際に、ルートブロックのブロックヘッダのアクセスカウンタを増加させる。
 アクセス管理部110は、検索部120がルートブロックのいずれかのエントリの識別子が示すブランチブロック220を読む際に、そのブランチブロック220のアクセスカウンタを1増加させる。更に、アクセス管理部110は、検索部120がこのブランチブロック220からたどるリーフブロック230にアクセスするときに、リーフブロック230のアクセスカウンタを1増加させる。
 〔動作例〕
 以下、第1実施形態におけるDBシステム10の動作例について図3及び図4を用いて説明する。図3は、第1実施形態におけるDBシステム10の動作例を示すフローチャートである。図3の例では、完全一致検索を行う場合の動作が示される。図4は、ブランチブロック220、リーフブロック230及びデータブロック240の関係の例を概念的に示す図である。ここでは、図4の例において、文字列の大小を辞書順に従って比較することを想定し、検索部120が、検索キー「go」を列データに含む行を検索する場合を例に挙げて、当該動作例を説明する。
 検索部120は、検索キーを取得すると、まず、ルートブロックを読み出す(S10)。図4の例では、検索部120は、検索キー「go」を取得すると、キー値「e」、「m」、「t」を含む各インデックスエントリを持つルートブロックを読み出す。
 アクセス管理部110は、検索部120がルートブロックにアクセスした場合に、そのルートブロックのアクセスカウンタを1増加させる(S11)。
 検索部120は、ルートブロック内のインデックスエントリのうち、当該検索キー以下の最大のキー値を持つエントリ、又は、当該検索キー以上の最小のキー値を持つエントリを特定する。いずれの特定方法を取っても一般性を失わないので、ここでは、検索部120は、当該検索キー以下の最大のキー値を持つエントリを特定するものとする(S12)。このエントリの特定は、ブロック中の全てのエントリを比較することにより実現されてもよいし、ブロック中のエントリをキー値でソートした上で一部のエントリを比較することにより実現されてもよい。
 図4の例では、簡略化されているが、キー値「e」については、例えば、キー値「e」を持つエントリと「e」より小さい値を示すキー値(例えば、NULL)を持つエントリとが含まれる。ここで、検索キー「go」以下の最大のキー値は「e」であり、検索キー「go」は、キー値「e」より大きくキー値「m」よりも小さいので、左から2番目のブランチブロックを特定する識別子を含むエントリが特定される。
 続いて、検索部120は、そのように特定されたエントリの識別子によって特定されるインデックスブロックを読み出す(S13)。
 アクセス管理部110は、検索部120がインデックスブロックを読み出すと、そのインデックスブロックのアクセスカウンタを1増加させる(S14)。
 検索部120は、ブロックヘッダに設定されるブロック種により、その読み出されたインデックスブロックがリーフブロック230かブランチブロック220かを判定する(S15)。検索部120及びアクセス管理部110は、その読み出されたインデックスブロックがブランチブロック220である場合には(S15;NO)、その読み出されたブランチブロック220に関し上記(S12)、(S13)及び(S14)の処理を実行する。
 検索部120は、その読み出されたインデックスブロックがリーフブロック230である場合には(S15;YES)、その読み出されたリーフブロック230内のエントリの中から、検索キーを含む検索条件に一致するエントリを特定する(S16)。ここでは、その検索条件は、検索キーを列データに含む行(完全一致)の検索を示す。図4の例では、キー値「go」を含むインデックスエントリが特定される。
 このインデックスエントリの特定は、リーフブロック230中の全てのエントリを比較することにより実現されてもよいし、リーフブロック230中のエントリをキー値でソートした上で一部のエントリを比較することにより実現されてもよい。
 検索部120は、特定されたインデックスエントリに含まれる識別子で特定される行データを抽出する(S17)。図4の例では、キー値「go」を含むインデックスエントリの識別子により特定されるデータブロック240の行が抽出される。例えば、その識別子に含まれるポインタで、行データの先頭が特定され、その先頭アドレスから行の大きさ(バイト数)分のデータが読み出される。
 〔第1実施形態の作用及び効果〕
 このように第1実施形態では、検索部120によるツリー構造に沿ったインデックス検索に応じて、データブロック240の少なくとも1つの行データが抽出されるまでにたどられた検索経路に含まれるインデックスブロックの各アクセスカウンタがアクセス管理部110によりそれぞれ更新される。
 従って、第1実施形態によれば、検索時にブランチブロック220及びリーフブロック230へのアクセスの回数がブロック毎に記録されるため、各インデックスブロックのアクセスカウンタを参照することにより、ブロック毎のアクセス負荷を容易に見積もることができる。各ブロックのアクセス負荷を見積もることができれば、例えば、その負荷に応じてCPUキャッシュに置くべきインデックスブロックを決める等、データベースの性能を最適化することも可能である。
 なお、第1実施形態では、データブロック240へのアクセスの回数はカウントされない。これは、データブロック240におけるブロック当たりのアクセス数がインデックスブロックのそれに比べて少ないからである。第1実施形態では、データベース性能を最適化する上で特に有用な情報として、インデックスブロックのアクセス回数がカウントされる。このようにして、第1実施形態では、アクセス回数のカウント処理で使われる負荷を必要最小限としている。もちろん、本実施形態において、データブロック240へのアクセスの回数をカウントするようにしてもよい。
 [第2実施形態]
 〔システム構成〕
 図5は、第2実施形態におけるDBシステム10の構成例を示す概念図である。第2実施形態におけるDBシステム10は、図5に示すように、第1実施形態の構成に加えて、データ挿入部130及びデータ削除部140を更に有する。以下、第2実施形態におけるDBシステム10について、第1実施形態と異なる内容を中心に説明し、第1実施形態と同一の内容についての説明は適宜省略する。データ挿入部130及びデータ削除部140についても、メモリ2に格納されるプログラムがCPU1により読み出され実行されることにより、ソフトウェア要素として実現される。
 データ挿入部130は、挿入する行データを受け取り、データブロック240にその行データを書き込む。このとき、データ挿入部130は、その挿入された行データに基づいて、インデックスブロック内のインデックスを更新する。データブロック240への書き込みは、例えば、挿入すべき行データよりも大きな空き領域を持つブロックのいずれか1つに書き込まれる。
 データ挿入部130は、インデックスの更新において、少なくとも、対応するリーフブロック230に、その挿入された行データに対応する新たなインデックスエントリを追加する。この新たなインデックスエントリは、キーが設定される列であって挿入された行に含まれる列データをキー値として含み、更に、その行を特定するための識別子を含む。
 インデックスの更新では、リーフブロック230へのエントリの追加に加えて、ブランチブロック220にも新たなインデックスエントリを追加することが要求される場合がある。それは、挿入対象のリーフブロック230に、新たなインデックスエントリを追加するための十分な空き領域がない場合(オーバーフローが起きた場合)である。
 このようにオーバーフローが起きた場合には、データ挿入部130は、ブロック分割を行うことによって空き領域を作る。ブロック分割では、データ挿入部130は、所定容量の空き領域がなくなったリーフブロック230のデータの一部を新たに確保したリーフブロック230に移すことで空き領域を作り出す。ブロック分割は、リーフブロック230のみでなくブランチブロック220においても同様に処理される。ブロック分割の詳細については動作例の項で詳述する。
 データ削除部140は、削除する行データを特定するための値を受け取り、データブロック240から行データを削除し、削除された行データに対応するインデックスエントリをリーフブロック230から削除する。例えば、削除する行データを特定するための値は、検索部120の検索処理の結果として取得される。
 インデックスエントリをリーフブロック230から削除することにより、リーフブロック230の空き領域が所定サイズ以上となった場合(アンダーフローが起きた場合)、データ削除部140は、このリーフブロック230を空きブロックにする。このアンダーフロー発生時の処理については動作例の項において詳述する。
 図6は、第2実施形態におけるインデックスブロックの構成例を概念的に示す図である。第2実施形態では、図6に示すように、アクセスカウンタとして、リードカウンタとライトカウンタとが設けられる。リードカウンタは、リードアクセスの数をカウントし、ライトカウンタは、ライトアクセス(エントリ削除も含む)の数をカウントする。
 これにより、第2実施形態におけるアクセス管理部110は、第1実施形態で説明したデータ検索時にはリードカウンタを増加させる。更に、アクセス管理部110は、行データ挿入時においてデータ挿入部130により新たなインデックスエントリが追加されると、そのインデックスエントリが追加されたインデックスブロックのライトカウンタを1増加させる。このとき、アクセス管理部110は、そのインデックスエントリが追加されたインデックスブロックを検索するまでにアクセスされた各インデックスブロックのリードカウンタをそれぞれ1増加させる。
 同様に、行データ挿入時においてブロック分割が行われる場合には、アクセス管理部110は、そのブロック分割処理においてアクセスされたインデックスブロックのリードカウンタを増加させ、かつ、ブロック分割処理でエントリが移動させられる度に移動先のインデックスブロックのライトカウンタを1増加させる。
 また、アクセス管理部110は、データ削除部140がインデックスブロックからエントリを削除した場合には、そのインデックスブロックのライトカウンタを増加させる。更に、アクセス管理部110は、データ削除部140がインデックスブロックを空きブロックにする場合には、そのインデックスブロックを空きブロックにするために移動されたエントリの移動先となる他のインデックスブロックのライトカウンタを増加させる。
 〔動作例〕
 以下、第2実施形態におけるDBシステム10の動作例について図7及び図8を用いて説明する。図7は、第2実施形態におけるDBシステム10のデータ挿入時の動作例を示すフローチャートである。
 データ挿入部130は、挿入すべき行データを取得すると、この行データを空き領域のある任意のデータブロック240に書き込む(S20)。
 データ挿入部130は、挿入された行データに対応するインデックスエントリを挿入すべきリーフブロック230を特定する(S21)。このリーフブロック230の特定は、挿入された行データにおけるキーが設定された列の値を検索キーとしたインデックス検索によりリーフブロック230を特定する場合と同様の手法で実現される。図3の動作例によれば、S10、S11、S12、S13、S14及びS15の処理が実行されることにより、挿入すべきリーフブロック230が特定される。
 従って、挿入された行データに対応するリーフブロック230を特定するために読み出されたインデックスブロックのリードカウンタは、アクセス管理部110によりカウントアップされる。
 続いて、データ挿入部130は、特定されたリーフブロック230に挿入すべき新たなインデックスエントリを生成する(S22)。新たなインデックスエントリは、挿入された行データにおけるキーが設定された列の値をキー値として含み、挿入された行データを特定するための識別子を含む。
 データ挿入部130は、特定されたリーフブロック230が新たなインデックスエントリの追加によりオーバーフローするか否かを判定する(S23)。ここで、オーバーフローとは、新たなインデックスエントリを追加するとブロックの空き領域が所定の比率を下回ることである。
 データ挿入部130は、オーバーフローしないと判定すると(S23;NO)、その特定されたリーフブロック230にその新たに生成されたインデックスエントリを書き込む(S24)。このとき、アクセス管理部110は、書き込まれたリーフブロック230のライトカウンタを1増加させる(S25)。
 続いて、データ挿入部130は、ブロック分割がなされたか否かを判定する(S26)。データ挿入部130は、ブロック分割がされていない場合には(S26;NO)、処理を終了し、ブロック分割がなされている場合には(S26;YES)、ブロック分割がなされたブロックの上位のブランチブロックを特定する(S27)。この上位ブランチブロックの特定は、再帰関数的な処理を施すことにより実現してもよいし、ブロックヘッダに上位ブロックの識別子を格納することで実現してもよい。
 以降、データ挿入部130は、その特定された上位ブランチブロックを対象ブロックとして処理(S22)に戻って各処理を実行する。
 一方、データ挿入部130は、オーバーフローすると判定した場合には(S23;YES)、その特定されたブロックに対してブロック分割処理を実行する。この処理において、まず、データ挿入部130は、オーバーフローすると判定されたブロックがルートブロックか否かを判定する(S30)。
 データ挿入部130は、オーバーフローすると判定されたブロックがルートブロックである場合(S30;YES)、新たなルートブロックとするための新たな空きブロックを取得する(S31)。このとき、アクセス管理部110は、取得された空きブロックのリードカウンタを1増加させる(S32)。
 データ挿入部130は、オーバーフローすると判定された現在のルートブロック内の最小のキー値及び現在のルートブロックを特定するための識別子を含むインデックスエントリを生成する(S33)。データ挿入部130は、このように生成されたインデックスエントリを、新たなルートブロックとするために取得された空きブロックに書き込む(S34)。言い換えれば、生成されたインデックスエントリは、新たなルートブロックから元のルートブロック(その後のブランチブロック)へリンクするためのデータとなる。
 このとき、アクセス管理部110は、そのインデックスエントリが書き込まれたブロックのライトカウンタを1増加させる(S35)。
 続いて、データ挿入部130は、ルートブロックを変更する(S36)。具体的には、データ挿入部130は、オーバーフローすると判定された元のルートブロックから新たに取得されたブロックに、ルートブロックを変更する。例えば、この変更は、ブロックヘッダのブロック種の変更により実現される。
 次に、データ挿入部130は、空きブロックを更に取得する(S37)。データ挿入部130は、そのオーバーフローすると判定されたブロック内の移動させるべきエントリを決定し、決定された各エントリを上記取得された空きブロックに順次移動させる(S38)。例えば、データ挿入部130は、予め閾値を保持しており、オーバーフローすると判定されたブロックのエントリのうち、当該閾値以上のキー値を持つエントリを移動エントリに決定する。その閾値には、中央値などのような、1つ以上のエントリのキー値よりも小さい値を用いる。
 このとき、アクセス管理部110は、エントリを空きブロックに移すたびに、空きブロックのライトカウンタを1増加させる(S39)。
 その後、データ挿入部130は、エントリの移動によりできた空き領域に処理(S22)で生成されたインデックスエントリを書き込む(S24)。データ挿入部130及びアクセス管理部110は、上述した処理(S25)以降の各処理を実行する。
 図8は、第2実施形態におけるDBシステム10のデータ削除時の動作例を示すフローチャートである。
 データ削除部140は、削除する行データを特定するための値を受け取り、データブロック240から行データを削除する(S40)。行データの削除は、行のデータを消去することで実現してもよいし、その行データに無効を示す値を付加することで実現してもよい。
 データ削除部140は、削除された行データを特定するインデックスエントリを有するリーフブロック230を特定する(S41)。このリーフブロック230の特定は、削除された行データにおけるキーが設定された列の値を検索キーとしたインデックス検索によりリーフブロック230を特定する場合と同様の手法で実現される。図3の動作例によれば、S10、S11、S12、S13、S14及びS15の処理が実行されることにより、当該リーフブロック230が特定される。
 データ削除部140は、特定されたリーフブロック230における、削除された行データに対応するインデックスエントリを削除する(S42)。このとき、アクセス管理部110は、そのインデックエントリが削除されたリーフブロック230のライトカウンタを増加させる(S43)。
 データ削除部140は、エントリを削除することによりリーフブロック230がアンダーフローするか否かを判定する(S44)。データ削除部140は、アンダーフローが起きていなければ(S44;NO)、処理を終了する。
 データ削除部140は、アンダーフローすると判定された場合には(S44;YES)、アンダーフローすると判定されたリーフブロック230に残るエントリを、他のリーフブロック230に移動させ、そのリーフブロック230を空きブロックにする(S45)。このとき、アクセス管理部110は、エントリを移動させた先のリーフブロック230のライトカウンタを1増加させる(S46)。
 なお、移動先ブロックは、一つであってもよいし、複数あってもよく、任意の方法で選択してもよい。データ削除部140は、空きブロックとなったリーフブロック230のアクセスカウンタ(リードカウンタ及びライトカウンタ)を0に設定する。空きブロックとすることで、このブロックはデータ挿入部130によって再利用される。また、空きブロック化されたリーフブロック230のアクセスカウンタは、それぞれ移動先のブロックのアクセスカウンタに合算されてもよい。
 続いて、データ削除部140は、ブロック統合が可能か否か判定する(S47)。具体的には、データ削除部140は、空きブロック化されたブロックの親ブロックにぶら下がる全子ブロックの全エントリをその親ブロックに入れることができるか否かを判定する(S47)。
 データ削除部140は、ブロック統合が不可能と判定すると(S47;NO)、処理を終了する。一方、データ削除部140は、ブロック統合が可能と判定すると(S47;YES)、それらブロックを統合する(S48)。つまり、子ブロックの全エントリを親ブロックに移しつつ、親ブロックに存在したエントリは削除する。結果、その親ブロックにぶら下がる全ての子ブロックを空きブロックにする。
 このとき、アクセス管理部110は、上位ブロックのライトカウンタを1増加させる(S49)。なお、統合される子ブロックのアクセスカウンタの値は、親ブロックのアクセスカウンタに合算されてもよい。
 〔第2実施形態の作用及び効果〕
 このように第2実施形態では、行データがデータブロック240に挿入された場合、その行データを特定するためのインデックスエントリがリーフブロック230に追加されると共に、そのリーフブロック230のライトカウンタが更新される。
 更に、そのインデックスエントリを追加すべきリーフブロック230を特定するためのインデックス検索において参照された各インデックスブロックのリードカウンタが更新される。また、その行データ挿入により、ブロック分割が生じた場合には、新たに取得された空きブロックのリードカウンタが更新され、エントリ移動の度にそのブロックのライトカウンタが逐次更新される。
 また、第2実施形態では、データブロック240から行データが削除されると、その行データに対応するインデックスエントリがリーフブロック230から削除されると共に、そのインデックスエントリが削除されたリーフブロック230のライトカウンタが更新される。更に、エントリ削除によりリーフブロック230がアンダーフローすると判定された場合には、その空きブロック化に伴い移動されたエントリの移動先のリーフブロック230のライトカウンタが更新される。更に、ブロックが統合される場合においても、統合される上位ブロックのライトカウンタが更新される。
 このように、第2実施形態によれば、各ブロックへのアクセス回数をリードとライトとを区別してそれぞれ管理することができる。リードアクセスとライトアクセスとでは、同じ1つのアクセスでも負荷が異なる。それは、アクセスに要する時間に差があり、かつ、異なる種類のロックをかける必要があるからである。
 従って、第2実施形態によれば、各インデックスブロックについて、アクセス種別毎のアクセス回数情報をそれぞれ管理することにより、データベース性能を最適化する上で一層有用な情報を提供することができる。そのような情報によれば、各インデックスブロックにおける、アクセス負荷や子ブロックへのアクセスの偏り等を正確に見積もることができ、更に、インデックスを付加することで効率化を図れる行とそうでない行とを特定することも可能となる。
 具体的には、第2実施形態で管理される、各インデックスブロックのリードカウンタ及びライトカウンタを用いれば、行単位でインデックスを付加すべきか否かを決めることができる。ツリーインデックスが付加されると検索は高速化されるが、更新時には、インデックス操作が必要となるため、効率が低下する。これにより、ライトカウンタの数が所定数より多いインデックスブロックのエントリで特定される行にはインデックスを付与しないほうが効率がよいと判断することができる。
 [第3実施形態]
 第3実施形態では、各ブロックが格納される記憶領域を区別して各ブロックのアクセスカウンタを管理する。以下、第3実施形態におけるDBシステム10について、上述の各実施形態と異なる内容を中心に説明し、上述の各実施形態と同一の内容についての説明は適宜省略する。
 〔システム構成〕
 図9は、第3実施形態におけるDBシステム10の構成例を示す概念図である。第3実施形態では、図9に示すように、複数の記憶領域(記憶領域A300及び記憶領域B400)が区別される。例えば、記憶領域A300は、メモリ2に含まれるアクセス速度の速いメモリ装置上で実現され、記憶領域B400は、メモリ2に含まれる記憶領域A300よりもアクセス速度の遅いメモリ装置上で実現される。
 例えば、記憶領域A300は一次記憶上に実現され、記憶領域B400はハードディスク等のような二次記憶上に実現される。なお、記憶領域の区別の仕方は、このような形態に制限されず、CPUキャッシュ、フラッシュメモリ、ハードディスク等のように記憶装置の種別毎に区別されてもよい。
 第3実施形態におけるDBシステム10は、第2実施形態の構成に加えて、記憶領域管理部150を更に有する。記憶領域管理部150についても、メモリ2に格納されるプログラムがCPU1により読み出され実行されることにより、ソフトウェア要素として実現される。
 記憶領域管理部150は、区別された各記憶領域A300及び記憶領域B400を管理する。本実施形態では、記憶領域A300がキャッシュとして扱われ、記憶領域B400には、DB部200の全てが格納される。記憶領域管理部150は、検索部120、データ挿入部130及びデータ削除部140がこれら記憶領域を区別することなく処理できるように制御する。
 記憶領域管理部150は、記憶領域B400内のDB部200の一部のブロックの複製を記憶領域A300に格納する。なお、記憶領域管理部150によるこのメモリ制御は、周知のキャッシュ技術が用いられればよいため、ここでは詳細な説明を省略する。
 図10は、第3実施形態におけるインデックスブロックの構成例を概念的に示す図である。第3実施形態におけるインデックブロックでは、図10に示すように、アクセスカウンタとして、記憶領域毎に、ライトカウンタとリードカウンタとの組がそれぞれ設けられる。
 ライトカウンタA及びリードカウンタAは、記憶領域A300に格納されたブロックのアクセス(キャッシュヒット)をカウントし、ライトカウンタB及びリードカウンタBは、記憶領域A300にはなかったために記憶領域B400から複製されたブロックへのアクセス(キャッシュミス)をカウントする。
 アクセス管理部110は、アクセスしたブロックの記憶領域を区別し、区別された記憶領域のためのアクセスカウンタを更新する。例えば、アクセス管理部110は、記憶領域管理部150からのキャッシュミスの発生の通知に応じて、どの記憶領域に格納されたブロックにアクセスしたのかを判別する。なお、本実施形態は、メモリ装置の種別の判別方法をこのような方法に限定するものではないため、周知の他の判別方法が利用されてもよい。
 〔第3実施形態の作用及び効果〕
 このように第3実施形態では、記憶領域(メモリ装置)毎に、アクセスカウンタが設けられ、アクセス時にそのインデックスブロックが格納されていた記憶領域に対応するアクセスカウンタが更新される。
 従って、第3実施形態によれば、例えば、ハードディスクなどの二次記憶に格納されているブロックが一次記憶上に複製されてから操作される場合の、一次記憶以外の記憶媒体へのアクセスの影響を考慮できるようになる。アクセス処理に要する時間は、インデックスブロックが格納されている記憶領域のタイプに応じて異なるため、第3実施形態によれば、上述の各実施形態に比べてより正確にアクセス負荷を見積もることができる。例えば、第3実施形態では、次のようにアクセス負荷Lを算出することができる。
 L=ar×arc+aw×awc+br×brc+bw×bwc
 ここで、ar及びawは、記憶領域A300上でのリード負荷及びライト負荷を示し、arc及びawcは、記憶領域A300上でのリードアクセス数及びライトアクセス数を示し、br及びbwは、記憶領域B400上でのリード負荷及びライト負荷を示し、brc及びbwcは記憶領域B400上でのリードアクセス数及びライトアクセス数を示す。
 [第4実施形態]
 上述の各実施形態では、ブロック毎のアクセス回数を管理する形態の例を示したが、第4実施形態では、そのアクセス回数を利用する形態の例を示す。以下、第4実施形態におけるDBシステム10について、上述の各実施形態と異なる内容を中心に説明し、上述の各実施形態と同一の内容についての説明は適宜省略する。
 〔システム構成〕
 図11は、第4実施形態におけるDBシステム10の構成例を示す概念図である。第4実施形態におけるDBシステム10は、第2実施形態の構成に加えて、アクセス負荷評価部310、行特定部320、アクセス偏り算出部330を更に有する。これら各処理部についても、メモリ2に格納されるプログラムがCPU1により読み出され実行されることにより、ソフトウェア要素として実現される。
 アクセス負荷評価部310は、任意のインデックスブロックを特定するためのデータを取得した場合に、そのデータで特定されるインデックスブロックのアクセス負荷を算出し、算出されたアクセス負荷を示す情報を出力する。アクセス負荷の算出の際に、アクセス負荷評価部310は、特定されたインデックスブロックに関する所定のリード負荷及び所定のライト負荷を取得し、かつ、そのインデックスブロックのブロックヘッダからアクセスカウンタを読み出す。
 アクセス負荷評価部310は、所定のリード負荷とリードアクセス数との積、及び、所定のライト負荷とライトアクセス数との積の和を算出し、この算出された値をアクセス負荷として出力する。ここで、リード負荷及びライト負荷は、1つのリードアクセスと1つのライトアクセスの処理にかかる各時間をそれぞれ示す。アクセス処理に要する時間にはばらつきがあるが、例えば、それらの平均値や中央値などの代表値がメモリ2に格納されており、その代表値がリード負荷及びライト負荷として利用される。
 任意のインデックスブロックを特定するためのデータは、他の装置から通信を介して取得されてもよいし、CPU1により実行されているプロセス等のような他の処理部から取得されてもよいし、ユーザインタフェースを介してユーザにより入力されてもよい。
 アクセス負荷評価部310は、任意のインデックスブロックを特定するためのデータを取得することなく、インデックスブロックの識別子とインデックスブロックのアクセス負荷との組がアクセス負荷の高い順に並べられたリストデータを出力するようにしてもよい。
 行特定部320は、インデックスを付加することで効率化を図れると推定される行を特定する。具体的には、行特定部320は、ライトアクセス数が全アクセス数に占める割合が所定値よりも高いリーフブロック230を特定する。行特定部320は、このように特定されたリーフブロック230に含まれる各インデックスエントリにより特定される行をインデックスを付加することで効率化が図れない行として特定する。
 行特定部320は、インデックスを付加することで効率化を図れると推定される行に対する識別子のリストを出力する。また、行特定部320は、インデックスを付加することで効率化を図れると推定される行のみにインデックスを付加し、それ以外の行からはインデックスを削除する処理を実行するようにしてもよい。また、行特定部320は、ライトアクセス数が全アクセス数に占める割合をその割合が高い順に指定された数分並べたリストを出力するようにしてもよい。
 アクセス偏り算出部330は、アクセスに偏りがあるブランチブロック220を特定する。ブランチブロック220は、通常、複数の子ブロックを持つ。子ブロックに対するアクセスの偏りは、各子ブロックのアクセスカウンタを利用することにより把握することができる。そこで、アクセス偏り算出部330は、リードアクセス数、ライトアクセス数、全アクセス数に関して、特定の子ブロックに偏ってアクセスを発生させたブランチブロック220を偏りが大きいものから所定数分特定する。
 なお、本実施形態は、偏りの算出手法自体を限定せず、周知の様々な手法が利用されればよい。例えば、全子ブロックへのアクセスのa%が、特定の子ブロックに対するアクセスであり、当該特定の子ブロックへのアクセス数は全子ブロックに対するアクセス数のx%(=100-a)であった場合には、この偏りは、a/xにより算出されてもよい。具体例では、ブランチブロック220が10個の子ブロックを持ち、10個のうちの2個の子ブロックへのアクセスが、10個の子ブロックへのアクセスの80%を占めていた場合、偏りは、4(=80/20)と算出される。
 偏りの算出手法としては、aとxとのいずれか一方を固定するのが最も単純な方法であるが、(75<=a<=90)等のように一方の値の範囲を指定して算出する手法が利用されてもよい。このような手法では、範囲指定された一方の値に対してもう一方の値を決め、求めた組に対して(a/x)を算出し、その最大値が偏りとして用いられる。
 アクセス負荷評価部310、行特定部320及びアクセス偏り算出部330により出力された情報は、入出力インタフェース3を介して、他の装置(コンピュータ)に送られてもよいし、表示装置等のユーザインタフェースから出力されてもよいし、ファイル等に格納された状態でメモリ2に保存されてもよい。本実施形態は、それら情報の出力形態を限定しない。
 〔第4実施形態の作用及び効果〕
 このように第4実施形態では、上述の各実施形態において管理されるブロック毎のアクセスカウンタを利用することにより、データベースの性能の適正化を図る上で有効となる新たな情報が出力される。具体的には、アクセス負荷評価部310により、各インデックスブロックのアクセス負荷の情報が出力され、行特定部320により、インデックスを付加することで効率化を図れると推定される行の情報が出力され、アクセス偏り算出部330により、アクセスに偏りがあるブランチブロック220の情報が出力される。
 例えば、上述のような出力情報を用いれば、行単位でインデックスを付加すべきかそうでないかを決めることができる。これは、検索、挿入及び削除といったデータベースに対する全ての操作を考慮した上でのデータベース性能の最適化に繋がる。また、アクセスの偏りに関する情報やアクセス負荷情報を用いれば、インデックスブロックのツリー構造の再設計や、キャッシュに優先的に置くべきインデックスブロックの特定等のようなデータベース性能の最適化を行うことができる。
 更に、アクセスの偏りに関する情報を用いれば、或るブランチブロック220の次にアクセスされる確率の高い他のブランチブロック220又はリーフブロック230、即ち、連続してアクセスされる確率の高いブロック関係を特定することができる。これにより、例えば、連続してアクセスされる可能性の高い2つのインデックスブロックを連続する記憶領域に配置することにより、それらが非連続の記憶領域に配置される場合と比較して処理を高速化することができる。
 即ち、第4実施形態によれば、データベース性能の最適化を行う上での有益な情報を提供することができる。
 [変形例]
 上述の第2実施形態、第3実施形態及び第4実施形態では、アクセスカウンタとして、リードカウンタとライトカウンタとがそれぞれ設けられたが、上述の第2実施形態、第3実施形態及び第4実施形態においても、第1実施形態のようにリードカウンタとライトカウンタとを統合して1つのアクセスカウンタで管理されるようにしてもよい。また、上述の各実施形態では、アクセスカウンタ(リードカウンタ及びライトカウンタを含む)は1ずつ増やされたが、この増加幅は、アクセス種別等に応じて適宜変えてもよい。
 また、上述の各実施形態では、ブランチブロック220内のインデックスエントリに含まれる各エントリは、いずれか1つの他のブランチブロック220又はいずれか1つのリーフブロック230を特定するための1つの識別子を含む例を示したが、複数の識別子が含まれるようにしてもよい。例えば、ブランチブロック220内の最小のキー値を持つエントリについては、そのキー値より小さいキー値に対応する子ブロックを特定するための識別子と、そのキー値以上で他のエントリのキー値よりも小さいキー値に対応する子ブロックを特定するための識別子とを含むようにしてもよい。
 なお、上記各実施形態の説明は、複数のフローチャートを用いており、それぞれに複数のステップ(処理)を順番に記載しているが、本実施形態は、各ステップの順番を図示される順番に限定するものではない。本実施形態では、図示される処理ステップの順番を内容的に支障しない範囲で変更することができる。また、上述した各実施形態及び変形例は、その内容が相反しない範囲で組み合わせることができる。
 上記の各実施形態及び変形例の一部又は全部は、以下の付記のようにも記載され得る。但し、各実施形態及び各変形例が以下の記載に限定されるものではない。
 (付記1)表データを格納するデータブロックを含むデータベースを管理するデータベース管理装置において、表データを構成する1つの行データ又は他のインデックスブロックを特定するための少なくとも1つのインデックスエントリ、及び、アクセスカウンタをそれぞれ有し、ツリー構造を持つ複数のインデックスブロックと、表データに対するデータ操作に応じて各インデックスエントリを参照することによりツリー構造に沿ってアクセスされた複数のインデックスブロックの各アクセスカウンタをそれぞれ更新するアクセス管理手段と、を備えることを特徴とするデータベース管理装置。
 (付記2)上記各インデックスブロック内のインデックスエントリを上記ツリー構造に沿って検索することにより、上記データブロック内の少なくとも1つの行データを抽出する検索手段、を更に備え、上記アクセス管理手段は、上記検索手段が上記複数のインデックスブロックのいずれか1つにアクセスする際に、そのアクセスされたインデックスブロックのアクセスカウンタを増加させ、続いて、そのアクセスされたインデックスブロック内のインデックスエントリにより特定される他のインデックスブロックにアクセスする際に、当該他のインデックスブロックのアクセスカウンタを増加させる、ことを特徴とする付記1に記載のデータベース管理装置。
 (付記3)上記データブロックに新たな行データを挿入すると共に、上記データブロックに挿入された行データを特定する新たなインデックスエントリを上記複数のインデックスブロックのうちの挿入対象のインデックスブロックに挿入し、この挿入対象のインデックスブロックに当該新たなインデックスエントリを挿入することができない場合には空のインデックスブロックを取得するデータ挿入手段、を更に備え、上記アクセスカウンタは、リードカウンタとライトカウンタとを含み、上記アクセス管理手段は、上記データ挿入手段が上記インデックスブロックに上記新たなインデックスエントリを挿入する際には、上記インデックスブロックのライトカウンタを増加させ、上記データ挿入手段が上記空のインデックスブロックを取得する際には、上記空のインデックスブロックのリードカウンタを増加させる、ことを特徴とする付記1又は2に記載のデータベース管理装置。
 (付記4)上記データ挿入手段は、上記挿入対象のインデックスブロック内のインデックスエントリの少なくとも1つを上記空のインデックスブロックに移動させると共に、上記新たなインデックスエントリを上記挿入対象のインデックスブロックに挿入し、上記アクセス管理手段は、上記データ挿入手段が上記少なくとも1つのインデックスエントリを上記空のインデックスブロックに移動させる場合に、上記空のインデックスブロックのライトカウンタを増加させる、ことを特徴とする付記3に記載のデータベース管理装置。
 (付記5)上記データブロックから行データを削除すると共に、削除された行データに対応するインデックスエントリを上記複数のインデックスブロックのうちの削除対象のインデックスブロックから削除し、上記削除対象のインデックスブロックを空きブロックにする場合には、上記削除対象のインデックスブロックに残っているインデックスエントリを他のインデックスブロックに移動させるデータ削除手段、を更に備え、上記アクセス管理手段は、上記データ削除手段が上記削除対象のインデックスブロックから上記インデックスエントリを削除した場合には、上記削除対象のインデックスブロックのライトカウンタを増加させ、上記データ削除手段が上記削除対象のインデックスブロックを空きブロックにする場合には、上記他のインデックスブロックのライトカウンタを増加させる、ことを特徴とする付記3又は4に記載のデータベース管理装置。
 (付記6)上記複数のインデックスブロックのうちの指定インデックスブロックに関するリード負荷情報及びライト負荷情報を取得し、その指定インデックスブロックのリードカウンタとそのリード負荷情報との積、及び、その指定インデックスブロックのライトカウンタとそのライト負荷情報との積の和を、その指定インデックスブロックのアクセス負荷として算出するアクセス負荷評価手段、を更に備えることを特徴とする付記3から5のいずれか1つに記載のデータベース管理装置。
 (付記7)ライトカウンタが全アクセス数に占める割合が所定値よりも高いインデックスブロックを特定する行特定手段を更に備えることを特徴とする付記3から6のいずれか1つに記載のデータベース管理装置。
 (付記8)複数の子インデックスブロックを特定する複数のインデックスブロックをそれぞれ格納する各親インデックスブロックに関し、当該複数の子インデックスブロックのアクセスカウンタに基づいて、全子インデックスブロックへのアクセス回数に対する特定の子インデックスブロックへのアクセス回数の偏りをそれぞれ算出し、偏りの大きいものから所定数分の親インデックスブロックを特定するための情報を出力するアクセス偏り算出手段、を更に備えることを特徴とする付記1から7のいずれか1つに記載のデータベース管理装置。
 (付記9)上記アクセスカウンタは、複数の記憶領域のそれぞれに対応して複数存在し、上記アクセス管理手段は、上記複数のインデックスブロックのいずれか1つへのアクセスが発生した場合に、アクセスされたインデックスブロックが有するアクセスカウンタであってアクセス先の記憶領域に対応するアクセスカウンタを更新する、ことを特徴とする付記1から8のいずれか1つに記載のデータベース管理装置。
 (付記10)表データを格納するデータブロックを含むデータベースを管理するプログラムにおいて、コンピュータを、上記表データを構成する1つの行データ又は他のインデックスブロックを特定するための少なくとも1つのインデックスエントリ、及び、アクセスカウンタをそれぞれ有し、ツリー構造を持つ複数のインデックスブロックと、上記表データに対するデータ操作に応じて各インデックスエントリを参照することにより上記ツリー構造に沿ってアクセスされた複数のインデックスブロックの各アクセスカウンタをそれぞれ更新するアクセス管理手段と、して機能させるためのプログラム。
 (付記11)上記コンピュータを、上記各インデックスブロック内のインデックスエントリを上記ツリー構造に沿って検索することにより、上記データブロック内の少なくとも1つの行データを抽出する検索手段、として更に機能させ、上記アクセス管理手段は、上記検索手段が上記複数のインデックスブロックのいずれか1つにアクセスする際に、そのアクセスされたインデックスブロックのアクセスカウンタを増加させ、続いて、そのアクセスされたインデックスブロック内のインデックスエントリにより特定される他のインデックスブロックにアクセスする際に、当該他のインデックスブロックのアクセスカウンタを増加させる、ことを特徴とする付記10に記載のプログラム。
 (付記12)上記コンピュータを、上記データブロックに新たな行データを挿入すると共に、上記データブロックに挿入された行データを特定する新たなインデックスエントリを上記複数のインデックスブロックのうちの挿入対象のインデックスブロックに挿入し、その挿入対象のインデックスブロックに当該新たなインデックスエントリを挿入することができない場合には空のインデックスブロックを取得するデータ挿入手段、として更に機能させ、上記アクセスカウンタは、リードカウンタとライトカウンタとを含み、上記アクセス管理手段は、上記データ挿入手段が上記インデックスブロックに上記新たなインデックスエントリを挿入する際には、上記インデックスブロックのライトカウンタを増加させ、上記データ挿入手段が上記空のインデックスブロックを取得する際には、上記空のインデックスブロックのリードカウンタを増加させる、ことを特徴とする付記10又は11に記載のプログラム。
 (付記13)上記データ挿入手段は、上記挿入対象のインデックスブロック内のインデックスエントリの少なくとも1つを上記空のインデックスブロックに移動させると共に、上記新たなインデックスエントリを上記挿入対象のインデックスブロックに挿入し、上記アクセス管理手段は、上記データ挿入手段が上記少なくとも1つのインデックスエントリを上記空のインデックスブロックに移動させる場合に、上記空のインデックスブロックのライトカウンタを増加させる、ことを特徴とする付記12に記載のプログラム。
 (付記14)上記コンピュータを、上記データブロックから行データを削除すると共に、削除された行データに対応するインデックスエントリを上記複数のインデックスブロックのうちの削除対象のインデックスブロックから削除し、上記削除対象のインデックスブロックを空きブロックにする場合には、上記削除対象のインデックスブロックに残っているインデックスエントリを他のインデックスブロックに移動させるデータ削除手段、として更に機能させ、上記アクセス管理手段は、上記データ削除手段が上記削除対象のインデックスブロックから上記インデックスエントリを削除した場合には、上記削除対象のインデックスブロックのライトカウンタを増加させ、上記データ削除手段が上記削除対象のインデックスブロックを空きブロックにする場合には、上記他のインデックスブロックのライトカウンタを増加させる、ことを特徴とする付記12又は13に記載のプログラム。
 (付記15)上記コンピュータを、上記複数のインデックスブロックのうちの指定インデックスブロックに関するリード負荷情報及びライト負荷情報を取得し、その指定インデックスブロックのリードカウンタとそのリード負荷情報との積、及び、その指定インデックスブロックのライトカウンタとそのライト負荷情報との積の和を、その指定インデックスブロックのアクセス負荷として算出するアクセス負荷評価手段、として更に機能させることを特徴とする付記12から14のいずれか1つに記載のプログラム。
 (付記16)上記コンピュータを、ライトカウンタが全アクセス数に占める割合が所定値よりも高いインデックスブロックを特定する行特定手段、として更に機能させることを特徴とする付記12から15のいずれか1つに記載のプログラム。
 (付記17)複数の子インデックスブロックを特定する複数のインデックスブロックをそれぞれ格納する各親インデックスブロックに関し、当該複数の子インデックスブロックのアクセスカウンタに基づいて、全子インデックスブロックへのアクセス回数に対する特定の子インデックスブロックへのアクセス回数の偏りをそれぞれ算出し、偏りの大きいものから所定数分の親インデックスブロックを特定するための情報を出力するアクセス偏り算出手段、として更に機能させることを特徴とする付記10から16のいずれか1つに記載のプログラム。
 (付記18)上記アクセスカウンタは、複数の記憶領域のそれぞれに対応して複数存在し、上記アクセス管理手段は、上記複数のインデックスブロックのいずれか1つへのアクセスが発生した場合に、アクセスされたインデックスブロックが有するアクセスカウンタであってアクセス先の記憶領域に対応するアクセスカウンタを更新する、ことを特徴とする付記10から17のいずれか1つに記載のプログラム。
 (付記19)表データを格納するデータブロックを含むデータベースを管理するデータベース管理方法において、上記表データを構成する1つの行データ又は他のインデックスブロックを特定するための少なくとも1つのインデックスエントリ、及び、アクセスカウンタをそれぞれ有し、ツリー構造を持つ複数のインデックスブロックを備えるコンピュータが、上記表データに対するデータ操作に応じて各インデックスエントリを参照し、上記参照により上記ツリー構造に沿ってアクセスされた複数のインデックスブロックの各アクセスカウンタをそれぞれ更新する、ことを特徴とするデータベース管理方法。
 (付記20)付記10から18のいずれか1つに記載のプログラムを記録したコンピュータが読み取り可能な記録媒体。
 この出願は、2010年12月16日に出願された日本出願特願2010-280397号を基礎とする優先権を主張し、その開示の全てをここに取り込む。

Claims (10)

  1.  表データを格納するデータブロックを含むデータベースを管理するデータベース管理装置において、
     前記表データを構成する1つの行データ又は他のインデックスブロックを特定するための少なくとも1つのインデックスエントリ、及び、アクセスカウンタをそれぞれ有し、ツリー構造を持つ複数のインデックスブロックと、
     前記表データに対するデータ操作に応じて各インデックスエントリを参照することにより前記ツリー構造に沿ってアクセスされた複数のインデックスブロックの各アクセスカウンタをそれぞれ更新するアクセス管理手段と、
     を備えることを特徴とするデータベース管理装置。
  2.  前記各インデックスブロック内のインデックスエントリを前記ツリー構造に沿って検索することにより、前記データブロック内の少なくとも1つの行データを抽出する検索手段、
     を更に備え、
     前記アクセス管理手段は、前記検索手段が前記複数のインデックスブロックのいずれか1つにアクセスする際に、該アクセスされたインデックスブロックのアクセスカウンタを増加させ、続いて、該アクセスされたインデックスブロック内のインデックスエントリにより特定される他のインデックスブロックにアクセスする際に、該他のインデックスブロックのアクセスカウンタを増加させる、
     ことを特徴とする請求項1に記載のデータベース管理装置。
  3.  前記データブロックに新たな行データを挿入すると共に、前記データブロックに挿入された行データを特定する新たなインデックスエントリを前記複数のインデックスブロックのうちの挿入対象のインデックスブロックに挿入し、該挿入対象のインデックスブロックに該新たなインデックスエントリを挿入することができない場合には空のインデックスブロックを取得するデータ挿入手段、
     を更に備え、
     前記アクセスカウンタは、リードカウンタとライトカウンタとを含み、
     前記アクセス管理手段は、前記データ挿入手段が前記インデックスブロックに前記新たなインデックスエントリを挿入する際には、前記インデックスブロックのライトカウンタを増加させ、前記データ挿入手段が前記空のインデックスブロックを取得する際には、前記空のインデックスブロックのリードカウンタを増加させる、
     ことを特徴とする請求項1又は2に記載のデータベース管理装置。
  4.  前記データブロックから行データを削除すると共に、削除された行データに対応するインデックスエントリを前記複数のインデックスブロックのうちの削除対象のインデックスブロックから削除し、前記削除対象のインデックスブロックを空きブロックにする場合には、前記削除対象のインデックスブロックに残っているインデックスエントリを他のインデックスブロックに移動させるデータ削除手段、
     を更に備え、
     前記アクセス管理手段は、前記データ削除手段が前記削除対象のインデックスブロックから前記インデックスエントリを削除した場合には、前記削除対象のインデックスブロックのライトカウンタを増加させ、前記データ削除手段が前記削除対象のインデックスブロックを空きブロックにする場合には、前記他のインデックスブロックのライトカウンタを増加させる、
     ことを特徴とする請求項3に記載のデータベース管理装置。
  5.  前記複数のインデックスブロックのうちの指定インデックスブロックに関するリード負荷情報及びライト負荷情報を取得し、該指定インデックスブロックのリードカウンタと該リード負荷情報との積、及び、該指定インデックスブロックのライトカウンタと該ライト負荷情報との積の和を、該指定インデックスブロックのアクセス負荷として算出するアクセス負荷評価手段、
     を更に備えることを特徴とする請求項3又は4に記載のデータベース管理装置。
  6.  ライトカウンタが全アクセス数に占める割合が所定値よりも高いインデックスブロックを特定する行特定手段、
     を更に備えることを特徴とする請求項3から5のいずれか1項に記載のデータベース管理装置。
  7.  複数の子インデックスブロックを特定する複数のインデックスブロックをそれぞれ格納する各親インデックスブロックに関し、該複数の子インデックスブロックのアクセスカウンタに基づいて、全子インデックスブロックへのアクセス回数に対する特定の子インデックスブロックへのアクセス回数の偏りをそれぞれ算出し、偏りの大きいものから所定数分の親インデックスブロックを特定するための情報を出力するアクセス偏り算出手段、
     を更に備えることを特徴とする請求項1から6のいずれか1項に記載のデータベース管理装置。
  8.  前記アクセスカウンタは、複数の記憶領域のそれぞれに対応して複数存在し、
     前記アクセス管理手段は、前記複数のインデックスブロックのいずれか1つへのアクセスが発生した場合に、アクセスされたインデックスブロックが有するアクセスカウンタであってアクセス先の記憶領域に対応するアクセスカウンタを更新する、
     ことを特徴とする請求項1から7のいずれか1項に記載のデータベース管理装置。
  9.  表データを格納するデータブロックを含むデータベースを管理するプログラムにおいて、
     コンピュータを、
     前記表データを構成する1つの行データ又は他のインデックスブロックを特定するための少なくとも1つのインデックスエントリ、及び、アクセスカウンタをそれぞれ有し、ツリー構造を持つ複数のインデックスブロックと、
     前記表データに対するデータ操作に応じて各インデックスエントリを参照することにより前記ツリー構造に沿ってアクセスされた複数のインデックスブロックの各アクセスカウンタをそれぞれ更新するアクセス管理手段、
     として機能させるためのプログラム。
  10.  表データを格納するデータブロックを含むデータベースを管理するデータベース管理方法において、
     前記表データを構成する1つの行データ又は他のインデックスブロックを特定するための少なくとも1つのインデックスエントリ、及び、アクセスカウンタをそれぞれ有し、ツリー構造を持つ複数のインデックスブロックを備えるコンピュータが、
     前記表データに対するデータ操作に応じて各インデックスエントリを参照し、
     前記参照により前記ツリー構造に沿ってアクセスされた複数のインデックスブロックの各アクセスカウンタをそれぞれ更新する、
     ことを特徴とするデータベース管理方法。
PCT/JP2011/006221 2010-12-16 2011-11-07 データベース管理装置及びデータベース管理方法 WO2012081165A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2012548619A JPWO2012081165A1 (ja) 2010-12-16 2011-11-07 データベース管理装置及びデータベース管理方法
US13/994,440 US9594785B2 (en) 2010-12-16 2011-11-07 Database management device and database management method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2010-280397 2010-12-16
JP2010280397 2010-12-16

Publications (1)

Publication Number Publication Date
WO2012081165A1 true WO2012081165A1 (ja) 2012-06-21

Family

ID=46244285

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/006221 WO2012081165A1 (ja) 2010-12-16 2011-11-07 データベース管理装置及びデータベース管理方法

Country Status (3)

Country Link
US (1) US9594785B2 (ja)
JP (1) JPWO2012081165A1 (ja)
WO (1) WO2012081165A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10685720B2 (en) 2018-08-21 2020-06-16 Toshiba Memory Corporation Memory system

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9449040B2 (en) * 2012-11-26 2016-09-20 Amazon Technologies, Inc. Block restore ordering in a streaming restore system
CN107301073B (zh) * 2017-06-23 2021-06-15 郑州云海信息技术有限公司 一种基于固态硬盘***的配置信息检索方法及其装置
US10733163B2 (en) * 2017-09-14 2020-08-04 International Business Machines Corporation Record insertion by generating unique index bases

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05334153A (ja) * 1992-06-01 1993-12-17 Nippon Telegr & Teleph Corp <Ntt> インデックス管理方式
JP2003345832A (ja) * 2002-05-23 2003-12-05 Nec Corp データ検索方法、データ検索装置及びデータ検索プログラム

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07200376A (ja) 1993-12-28 1995-08-04 Fuji Xerox Co Ltd データベース管理装置
US6047283A (en) * 1998-02-26 2000-04-04 Sap Aktiengesellschaft Fast string searching and indexing using a search tree having a plurality of linked nodes
US6584458B1 (en) * 1999-02-19 2003-06-24 Novell, Inc. Method and apparatuses for creating a full text index accommodating child words
JP4313068B2 (ja) 2003-03-28 2009-08-12 株式会社日立製作所 記憶装置のキャッシュ管理方法
JP2008015810A (ja) 2006-07-06 2008-01-24 Hitachi Software Eng Co Ltd 複数列の表データにおけるインデクス分割管理方法
JP5088668B2 (ja) 2007-03-08 2012-12-05 日本電気株式会社 計算機負荷見積システム、計算機負荷見積方法、計算機負荷見積プログラム
US8065293B2 (en) * 2007-10-24 2011-11-22 Microsoft Corporation Self-compacting pattern indexer: storing, indexing and accessing information in a graph-like data structure
JP2009122850A (ja) 2007-11-13 2009-06-04 Toshiba Corp ブロックデバイス制御装置及びアクセス範囲管理方法
JP5257843B2 (ja) 2008-12-12 2013-08-07 日本電気株式会社 分散キャッシュシステム、方法、プログラム、及び計算ノード
US8527547B2 (en) * 2011-06-27 2013-09-03 International Business Machines Corporation Sampling the space of ancestral recombination graphs

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05334153A (ja) * 1992-06-01 1993-12-17 Nippon Telegr & Teleph Corp <Ntt> インデックス管理方式
JP2003345832A (ja) * 2002-05-23 2003-12-05 Nec Corp データ検索方法、データ検索装置及びデータ検索プログラム

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"Oracle Database Gaiyo 10g Release 2(10.2) Buhin Bango: B19215-02", ORACLE, March 2006 (2006-03-01), pages 5-25 - 5-27, Retrieved from the Internet <URL:http://otndnld.oracle.co.jp/document/products/oracle10g/102/doccd/server.102/B19215-02.pdf> [retrieved on 20111202] *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10685720B2 (en) 2018-08-21 2020-06-16 Toshiba Memory Corporation Memory system

Also Published As

Publication number Publication date
US9594785B2 (en) 2017-03-14
US20130268484A1 (en) 2013-10-10
JPWO2012081165A1 (ja) 2014-05-22

Similar Documents

Publication Publication Date Title
US11238098B2 (en) Heterogenous key-value sets in tree database
TWI702506B (zh) 用於合併樹廢棄項目指標之系統、機器可讀媒體及機器實施之方法
US20200334294A1 (en) Merge tree modifications for maintenance operations
US9836541B2 (en) System and method of managing capacity of search index partitions
KR102564170B1 (ko) 데이터 객체 저장 방법, 장치, 및 이를 이용한 컴퓨터 프로그램이 저장되는 컴퓨터 판독가능한 저장 매체
CN106030579B (zh) 用于针对存储器内的多个存储区域扫描指定量的结果的方法、***和计算机程序
TW201837720A (zh) 用於多串流儲存裝置之串流選擇
JP2005267600A5 (ja)
CN109271343A (zh) 一种应用于键值存储***中的数据合并方法和装置
CN102819586A (zh) 一种基于高速缓存的url分类方法和设备
US20140229496A1 (en) Information processing device, information processing method, and computer program product
Li et al. ASLM: Adaptive single layer model for learned index
JP5790755B2 (ja) データベース管理装置及びデータベース管理方法
KR20210058118A (ko) CaseDB: 엣지컴퓨팅을 위한 저비용 Put-Intensive 키-벨류 저장장치
WO2012081165A1 (ja) データベース管理装置及びデータベース管理方法
US20080133493A1 (en) Method for maintaining database clustering when replacing tables with inserts
US10733218B2 (en) System, method, and program for aggregating data
US20180011897A1 (en) Data processing method having structure of cache index specified to transaction in mobile environment dbms
JP6006740B2 (ja) インデックス管理装置
US20200218705A1 (en) System and method of managing indexing for search index partitions
JP2008065716A (ja) データ管理装置、データ管理方法及びデータ管理プログラム
JP4825504B2 (ja) データ登録・検索システムおよびデータ登録・検索方法
JP6627809B2 (ja) データベース処理装置、システム、方法およびプログラム
WO2021224960A1 (ja) 保存装置、保存方法、およびプログラム
JP5226445B2 (ja) データベースに対する問合せを処理する装置、処理方法、プログラムおよび記録媒体

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: 11848469

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2012548619

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 13994440

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11848469

Country of ref document: EP

Kind code of ref document: A1