WO2012169102A1 - データベース性能予測装置及びデータベース予測方法 - Google Patents

データベース性能予測装置及びデータベース予測方法 Download PDF

Info

Publication number
WO2012169102A1
WO2012169102A1 PCT/JP2012/002489 JP2012002489W WO2012169102A1 WO 2012169102 A1 WO2012169102 A1 WO 2012169102A1 JP 2012002489 W JP2012002489 W JP 2012002489W WO 2012169102 A1 WO2012169102 A1 WO 2012169102A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
time
average
entry
storage medium
Prior art date
Application number
PCT/JP2012/002489
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 JP2013519351A priority Critical patent/JP6020448B2/ja
Priority to US14/124,209 priority patent/US9336254B2/en
Publication of WO2012169102A1 publication Critical patent/WO2012169102A1/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3419Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment by assessing time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3452Performance evaluation by statistical analysis
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/80Database-specific techniques

Definitions

  • the present invention relates to a database performance prediction technique to which an index block is assigned.
  • Non-Patent Document 1 describes a search using a B-tree and an algorithm for inserting and deleting data in the B-tree.
  • Non-Patent Document 2 describes a B-tree in ORACLE (registered trademark), a widely used relational database.
  • FIG. 10 shows a configuration example of a B-tree index with reference to FIGS. 5 to 7 of Non-Patent Document 2 below.
  • ORACLE registered trademark
  • a storage area is managed in a certain unit (for example, 8 KB), and this unit is called a block.
  • data block the entire data row is stored.
  • the index is stored in leaf blocks and branch blocks. Therefore, leaf blocks and branch blocks are also called index blocks.
  • the leaf block is the lowest layer block in the index block.
  • a branch block is a block having a link to a leaf block or another branch block.
  • each entry serving as an index is stored.
  • the highest-level branch block is sometimes called a root block.
  • Each entry includes a column value (hereinafter referred to as a key) and an identifier (ID) to be searched.
  • the identifier is data for specifying a data row or another block.
  • the identifier included in the entry of the leaf block specifies any one data row of the data block, and the identifier included in the entry of the branch block includes any one of the other branch blocks or any one of the leaf blocks. Is identified. Therefore, in order to identify a leaf block having a key satisfying the search condition, the searcher sequentially compares the key in the branch block with the data of the search condition and traces the branch block using the identifier.
  • the B-tree is designed with the assumption that copying a block from a low-speed hard disk to a high-speed memory is a bottleneck.
  • the “Balancing” section of Non-Patent Document 1 below describes that it is important to keep the height of the B-tree low because reading a block involves disk access. In fact, in situations where many blocks are recorded on the hard disk and only some of the blocks are cached in memory, in most cases the blocks are read from the disk.
  • the performance bottleneck is disk access. This is because the latency of access to the data on the memory and the data transfer rate (bandwidth) of the data on the memory are significantly better than those for the disk. Therefore, disk access is minimized by matching the size of each block to the unit of disk I / O.
  • Non-Patent Documents 5 to 7 proposals for physical arrangement of data such as a B-tree are proposed.
  • the reference interval is 5 minutes or less, it is effective to place data in the memory instead of the hard disk (5-minute rule).
  • One instruction can be reduced per second by placing 10 bytes in the memory. In this case, it is proposed that even if extra memory is used, it is effective.
  • the 5-minute rule will be further described.
  • the 5-minute rule is a branching point as to whether or not the following conditional expression is satisfied, and whether or not it is profitable with respect to placing data in the memory.
  • R is 5 minutes
  • the condition is satisfied.
  • the expression is satisfied.
  • R is a reference interval
  • M is a byte unit price of the memory
  • A is a band unit price of the disk
  • B is a data size
  • Bmax is a block size of the disk.
  • Non-Patent Document 6 in the environment 10 years after Non-Patent Document 1, a block that is randomly accessed is a reference interval of 5 minutes or less, and a block that is sequentially accessed is a reference interval of 1 minute or less. It is stated that it is effective to put it in memory instead of hard disk. Further, according to Non-Patent Document 6 below, the appropriate B-tree block size is determined from the time required for block access modeled by the disk bandwidth and latency, and the degree to which the search target can be narrowed down by accessing the block. It has been demanded.
  • the following non-patent document 7 describes that in the environment 20 years after the following non-patent document 1, the above five-minute rule is established between the memory and the flash memory. It is also described that the reference interval at which it is effective to store the data placed on the disk in the flash memory is 2 hours. According to the following non-patent document 7, regarding the B-tree block size, it is effective to set the disk to 512 KB and the flash memory to 2 KB.
  • Non-Patent Document 8 describes that an operation cost COST used to create an optimal execution plan corresponding to an SQL statement is calculated by the following formula in CBO (Cost Base Optimizer).
  • CPU_COST is a value proportional to the number of CPU (Central Processing Unit) cycles required for the operation
  • IO_COST is a value proportional to the number of blocks read by the operation.
  • SREADTIM is the average response time (msec) of random reads from a single block disk
  • CPUSPEED is the average number of cycles per second (MHz).
  • Non-Patent Document 9 describes that the number of blocks accessed in an insertion operation is calculated as the cost for the insertion operation as follows (see pp. 20).
  • search cost is set to 3.
  • Patent Document 1 it is proposed to consider the degree of access to adjacent blocks when selecting an access path for a database management system.
  • the method in Patent Document 1 below is roughly based on the time to access adjacent blocks on the disk, the time to access non-adjacent blocks, the time to process each row, the number of blocks to be accessed, and the number of accesses to non-adjacent blocks. Calculate the predicted value of execution time.
  • Non-Patent Documents 3 and 4 describe latency, bandwidth, and price as specifications regarding caches, memories, flashes, and disks that are storage media (see FIG. 11).
  • a delay of 14 cycles or less occurs. This delay corresponds to approximately 0.005 (us) in a 2.5 to 3.0 (GHz) CPU.
  • the flash latency in FIG. 11 is the read latency.
  • these prediction methods have a problem of low accuracy. This is because these prediction methods do not take into account, for example, the configuration of the index block, the operation method for the index block, detailed processing for forming each operation, the physical arrangement of the index block, and the like.
  • a configuration mode for example, there are a mode in which entries are stored in each block in a sorted state, and a mode in which the entries are stored in a non-sorted state.
  • an operation method for example, in the search of each block, there are a method of searching in order from the first entry and a method of searching by a binary search method.
  • An object of the present invention is to provide a technique for predicting a time required for an operation on a database to which an index having a tree structure is attached with high accuracy.
  • the first aspect relates to a database performance prediction apparatus for a database including an index block having a tree structure.
  • the database performance prediction apparatus according to the first aspect relates to configuration mode data indicating any one of at least two configuration modes, an average number of entries per block (m), and an average processing time per entry for the index block. Entry processing time (a) shown, write ratio (w) showing the ratio of insertion operations to all operations, latency (L) regarding the storage medium storing the index block, and average branch block height (h) It corresponds to at least two search methods related to the data acquisition means and the at least two configuration modes, and uses latency (L), entry processing time (a), and average number of entries per block (m).
  • the average time taken to specify the target entry in the block which is calculated by switching at least two types of calculation methods, is defined as the child block search time (d) and the leaf block scanning time (s).
  • Search time calculation means to be acquired and at least two types of calculation methods corresponding to at least two entry insertion methods related to at least two configuration modes, wherein the latency (L) and the entry processing time (a) are used.
  • at least two types of calculation methods including a calculation method using latency (L), entry processing time (a), and average number of entries per block (m).
  • the index block is obtained by multiplying the insertion time calculation means for obtaining the entry insertion time (i) indicating the average time taken to insert the average branch block height (h) and the child block search time (d).
  • the average time taken to specify the target leaf block per operation to the index block is calculated, and the leaf specified per operation for the index block is calculated using the leaf block scanning time (s) and the write ratio (w).
  • Processing time estimation means for estimating the average processing time per operation to the rack.
  • the second aspect relates to a database performance prediction apparatus for a database including a tree-structured index block.
  • the database performance prediction apparatus according to the second aspect obtains the write ratio (w) and the average branch block height (h) indicating the ratio of the insert operation to the total operation for the index block, and the second for the second storage medium.
  • Latency, cache miss rate indicating the probability that the target part of the index block is not stored in the first storage medium and the target part needs to be transferred from the second storage medium, and from the second storage medium to the first storage medium
  • First data acquisition means for acquiring a data transfer time per block, a primary child block search time (d) indicating an average time taken to specify a child block from the blocks stored in the first storage medium, Primary leaf block scanning time (s) indicating the average time taken to identify the target entry in the leaf block stored in one storage medium
  • Second data acquisition means for acquiring a primary entry insertion time (i) indicating an average time taken to insert a target entry into a leaf block stored in the first storage medium;
  • an additional time calculation means for calculating an additional time related to a cache miss by multiplying a value obtained by adding the data transfer time per block from the first storage medium to the cache miss rate, and a primary child block search time (d ) By adding the additional time to the primary leaf block scanning time (s) and the primary entry insertion time (i), respectively
  • the average time required to specify the target leaf block per operation to the index block is calculated, and the index block is calculated using the secondary leaf block scanning time (s ′) and the write ratio (w).
  • the average time taken to search for the target entry in the specified leaf block per operation is calculated for the index block using the secondary entry insertion time (i ′) and the write ratio (w).
  • the third aspect relates to a database performance prediction method for a database including a tree-structured index block.
  • the computer relates to the index block, the configuration mode data indicating any one of at least two configuration modes, the average number of entries per block (m), and the average processing per entry Entry processing time (a) indicating time, write ratio (w) indicating the ratio of insertion operations to all operations, latency (L) regarding the storage medium storing the index block, and average branch block height (h) Acquire at least two search methods corresponding to at least two search methods related to at least two configuration modes, and using latency (L), entry processing time (a), and average number of entries per block (m) Is calculated by switching and executing the calculation method according to the configuration mode data.
  • the average time taken to identify the target entry in the queue is acquired as a child block search time (d) and a leaf block scanning time (s), and is used in at least two entry insertion methods related to at least two configuration modes. At least two types of calculation methods corresponding to the calculation method using the latency (L) and the entry processing time (a), and the latency (L), the entry processing time (a), and the average number of entries per block (
  • the entry insertion time (i) indicating the average time taken to insert the target entry in the leaf block by switching and executing at least two kinds of calculation methods including the calculation method using m) according to the configuration mode data ) And multiplying the average branch block height (h) by the child block search time (d)
  • the average time required to specify the target leaf block per operation to the block is calculated, and the leaf block scanning time (s) and the write ratio (w) are used to specify the per-operation for the index block.
  • the average time required to search for the target entry in the leaf block is calculated, and the entry insertion time (i) and the write ratio (w) are used to determine the inside of the specified leaf block per operation to the index block. And calculating the average time required to insert the target entry, and estimating the calculated average time as the average processing time per operation on the index block.
  • the fourth aspect relates to a database performance prediction method for a database including a tree-structured index block.
  • the computer acquires the write ratio (w) and the average branch block height (h) indicating the ratio of the insert operation to the total operation for the index block, and the second storage medium Second latency with respect to, a cache miss rate indicating a probability that the target part of the index block is not stored in the first storage medium and the target part needs to be transferred from the second storage medium, and the first from the second storage medium Primary child block search time (d) indicating the average time taken to acquire the data transfer time per block to the storage medium and specify the child block from the blocks stored in the first storage medium, the first storage medium Primary leaf block scanning time (s) indicating the average time taken to identify the target entry in the leaf block stored in the first, first The primary entry insertion time (i) indicating the average time taken to insert the target entry into the leaf block stored in the storage medium is acquired, and the block from the second storage medium to the first storage medium is obtained
  • the additional time related to the cache miss is calculated by multiplying the value obtained by adding the per-data transfer time and the cache miss rate to obtain the primary child block search time (d), the primary leaf block scanning time (s), and 1
  • the secondary child block search time (d ′), secondary leaf block scanning time (s ′), and secondary entry insertion time (i ′) are calculated by adding the additional time to the next entry insertion time (i).
  • the target level per operation on the index block is calculated.
  • a computer program that causes a computer to realize the configuration of each aspect described above may be used, or a computer-readable recording medium that stores such a computer program may be used.
  • This recording medium includes a non-transitory tangible medium.
  • FIG. 1 is a diagram conceptually illustrating a configuration example of a database performance prediction apparatus in the first embodiment.
  • FIG. 2 is a diagram illustrating an operation example of the database performance prediction apparatus according to the first embodiment together with a data flow.
  • FIG. 3 is a diagram conceptually illustrating a configuration example of the database performance prediction apparatus according to the second embodiment.
  • FIG. 4 is a diagram illustrating an operation example of the database performance prediction apparatus according to the second embodiment together with a data flow.
  • FIG. 5 is a diagram conceptually illustrating a configuration example of the database performance prediction apparatus according to the third embodiment.
  • FIG. 6 is a diagram illustrating an operation example of the database performance prediction apparatus according to the third embodiment together with a data flow.
  • FIG. 1 is a diagram conceptually illustrating a configuration example of a database performance prediction apparatus in the first embodiment.
  • FIG. 2 is a diagram illustrating an operation example of the database performance prediction apparatus according to the first embodiment together with a data flow.
  • FIG. 3 is a diagram conceptually
  • FIG. 7 is a diagram conceptually illustrating a configuration example of the database performance prediction apparatus according to the fourth embodiment.
  • FIG. 8 is a diagram illustrating an operation example of the database performance prediction apparatus according to the fourth embodiment together with a data flow.
  • FIG. 9 is a diagram illustrating an operation example of the database performance prediction apparatus according to the fifth embodiment together with a data flow.
  • FIG. 10 is a diagram illustrating a configuration example of a B-tree index.
  • FIG. 11 is a diagram illustrating an example of specifications of each storage medium.
  • the database performance prediction apparatus evaluates (predicts) the time required for an operation on a database to which an index having a tree structure is assigned as database performance.
  • the index assigned to the database to be predicted only needs to be stored in a tree structure, and is not limited to a technique called B-tree.
  • FIG. 1 is a diagram conceptually illustrating a configuration example of a database performance prediction apparatus in the first embodiment.
  • the database performance prediction apparatus (hereinafter simply referred to as a prediction apparatus) 10 includes a CPU 1, a memory 2, an input / output interface (I / F) 3, and the like as a hardware configuration.
  • the memory 2 is a RAM (Random Access Memory), a ROM (Read Only Memory), a hard disk, a portable storage medium, or the like.
  • the input / output I / F 3 is connected to a communication device that communicates with other devices.
  • the input / output I / F 3 may be connected to a user interface device such as a display device or an input device. Note that this embodiment does not limit the hardware configuration of the prediction device 10.
  • the prediction device 10 estimates the average processing time per operation for the index block as a performance prediction of the database including the tree-structured index block.
  • the database that is the prediction target of the prediction device 10 may be realized on the prediction device 10 or may be realized on another computer.
  • the database to be predicted has, for example, the configuration shown in FIG.
  • a branch block including the index entry is referred to as a parent block
  • a leaf block or other branch block specified by the index entry identifier is referred to as a child block.
  • the prediction device 10 in the first embodiment includes a data acquisition unit 11, a search time calculation unit 15, an insertion time calculation unit 16, a processing time estimation unit 18 and the like as illustrated in FIG.
  • Each of these processing units is realized by the CPU 1 executing a program stored in the memory 2.
  • the program is installed from a portable recording medium such as a CD (Compact Disc) or a memory card or another computer on the network via the input / output I / F 3 and stored in the memory 2.
  • the data acquisition unit 11 relates to an index block of a database to be predicted, configuration mode data indicating any one of at least two configuration modes, an average number of entries per block (m), and an entry indicating an average processing time per entry
  • the processing time (a), the write ratio (w) indicating the ratio of the insert operation to the total operation, the latency (L) regarding the storage medium storing the index block, and the average branch block height (h) are acquired.
  • the configuration mode data is data for specifying a configuration mode employed in the index block to be predicted among at least two configuration modes.
  • the configuration mode means a mode that can be adopted in the index block to be predicted, such as whether or not the entries in the block are sorted, and the search method and operation method of the entries in the block.
  • the entries in the block are not sorted, and a technique of searching in order from the first entry (hereinafter referred to as a whole search technique) is adopted as the search technique, and free space A method in which the method of inserting at the head of is used as the entry insertion method is shown.
  • the entries in the block are sorted, and a method of searching by a binary search method (hereinafter referred to as a binary search method) is adopted as a search method, and an appropriate position in the sorted entry.
  • a method in which the method of inserting in is adopted as the entry insertion method is shown.
  • the configuration modes to be supported are not limited to these two configuration modes, and other search methods and other entry insertion methods may be added to support three or more configuration modes. Good.
  • the data acquisition unit 11 acquires each piece of information as described above when the user inputs using a user interface device connected to the input / output I / F 3. In this case, the data acquisition unit 11 displays a screen for inputting each information on a display device (not shown), and acquires the data input on this screen as each information described above. Moreover, the data acquisition part 11 may acquire each information from another apparatus via communication, and may acquire it from the portable storage medium which stores each information.
  • the search time calculation unit 15 uses the latency (L), entry processing time (a), and average number of entries per block (m) acquired by the data acquisition unit 11, and uses the child block search time (d) and leaf The block scanning time (s) is calculated.
  • the child block search time (d) indicates an average time taken to specify a certain child block (block one step lower) from a certain branch block.
  • the leaf block scanning time (s) indicates an average time taken to specify the target entry in the leaf block.
  • the search time calculation unit 15 calculates the average time taken to specify the target entry in the branch block or leaf block as the child block search time (d) and the leaf block scanning time (s).
  • the search time calculation unit 15 corresponds to at least two search methods indicated by the at least two configuration modes, and uses latency (L), entry processing time (a), and average number of entries per block (m). Has at least two calculation methods.
  • the search time calculation unit 15 has two types of calculation methods corresponding to the full search method and the binary search method.
  • the search time calculation unit 15 calculates an average time required to specify the target entry in the block by switching and executing at least two types of calculation methods according to the configuration mode data acquired by the data acquisition unit 11. .
  • the search time calculation unit 15 acquires the calculated average time as a child block search time (d) and a leaf block scanning time (s).
  • Examples of at least two types of calculation methods that the search time calculation unit 15 has are given below.
  • An example of the calculation method corresponding to the first configuration mode (full search method) is (Formula 1) below, and an example of the calculation method corresponding to the second configuration mode (binary search method) is (Formula 2) below. ).
  • “*” indicates multiplication.
  • d L + a * m
  • s L + a * m
  • d (L + a) * log 2 m
  • s (L + a) * log 2 m ( Equation 2)
  • the latency (L) includes the entry processing time (a) and the average entry per block. A value obtained by multiplying the number (m) is added.
  • the latency (L) and the entry processing time (a) take one comparison, and the latency (L) and the entry processing are calculated as shown in (Equation 2).
  • the value obtained by adding the time (a) is multiplied by the average number of comparisons when the binary search is performed with respect to the average number of entries per block (m).
  • the second term (a * m) in the above (Equation 1) is a term obtained by further multiplying by a predetermined coefficient ( ⁇ ) for increasing the accuracy of the number of entries referred to until the target entry is specified. ( ⁇ * a * m) can also be used.
  • the insertion time calculation unit 16 switches and executes at least two types of calculation methods corresponding to at least two entry insertion processes indicated by the at least two configuration modes according to the configuration mode data acquired by the data acquisition unit 11.
  • the entry insertion time (i) indicating the average time taken to insert the target entry into the leaf block is calculated.
  • the insertion time calculation unit 16 includes, as at least two types of calculation methods, a calculation method using latency (L) and entry processing time (a), and latency (L), entry processing time (a), and average per block.
  • a calculation method using the number of entries (m) is provided.
  • Examples of at least two types of calculation methods possessed by the insertion time calculation unit 16 are given below.
  • An example of a calculation method corresponding to the first configuration mode is (Formula 3) below, and an example of a calculation method corresponding to the second configuration mode is (Formula 4) below.
  • i L + a (Formula 3)
  • i (L + a) * log 2 m + a * m (Formula 4)
  • the empty latency (L) and the entry processing time (a) are added together.
  • the time taken to specify the insertion position of the entry and the time taken to move the order of the entries already stored for inserting the entry are added up. Is done.
  • the first half term of (Formula 4) indicates the former time
  • the second half term indicates the latter time. According to the example of (Expression 4), the first half term of (Expression 4) is the same as that of (Expression 2).
  • the time required to move the order of entries (second half term) is obtained by multiplying the average entry count (m / 2) that needs to be moved by the moving time (2 * a) of one entry. (A * m).
  • the movement time of one entry includes time (a) for reading the entry and time (a) for writing the entry in the position after movement.
  • Equation 4 the second term (a * m) in the above (Equation 4) can be further multiplied by a predetermined coefficient ( ⁇ ) for increasing the accuracy of the average number of entries that need to be moved ( ⁇ * a * m).
  • the processing time estimation unit 18 includes a child block search time (d) and a leaf block scanning time (s) calculated by the search time calculation unit 15, an entry insertion time (i) calculated by the insertion time calculation unit 16, and data acquisition.
  • the average processing time (t) per operation for the index block is calculated using the information acquired by the unit 11.
  • the processing time estimation unit 18 estimates the calculated time as the time required for the operation on the database. Note that the time taken to operate the data block is not considered in the estimated time because the time taken to operate the data block affects the performance of the entire database compared to the operation to the index block. Because it is small. That is, the operation on the index block is executed more frequently than the operation (processing) on the data block.
  • the processing time estimation unit 18 calculates the average time required for each process for each detailed process forming one operation on the index block, and adds the average times to calculate the average per operation on the index block.
  • a processing time (t) is calculated.
  • the processing time estimation unit 18 determines the average time (hereinafter, referred to as leaf block specific time) required to specify the target leaf block per operation to the index block, and per operation for the index block.
  • the average time taken to search for the target entry in the specified leaf block hereinafter referred to as entry specific time
  • entry insertion time is calculated.
  • FIG. 2 is a diagram illustrating an operation example of the prediction device 10 according to the first embodiment together with a data flow.
  • the data acquisition unit 11 performs configuration mode data, average number of entries per block (m), entry processing time (a), latency (L), average branch block height (h), and write ratio. (W) is acquired (S1).
  • the search time calculation unit 15 and the insertion time calculation unit 16 perform calculations corresponding to the configuration mode data using the average number of entries per block (m), the entry processing time (a), and the latency (L). (S2). Thereby, the child block search time (d), the leaf block scanning time (s), and the entry insertion time (i) are calculated (S2-1, S2-2, S2-3).
  • the processes (S2-1), (S2-2), and (S2-3) may be executed in parallel, or may be executed sequentially in a predetermined order.
  • the processing time estimation unit 18 obtains the data acquisition unit 11 together with the child block search time (d), leaf block scanning time (s), and entry insertion time (i) calculated in the processing (S2).
  • An average processing time (t) is calculated using the average branch block height (h) and the write ratio (w) (S3).
  • the search time calculation unit 15 and the insertion time calculation unit 16 are based on the information acquired by the data acquisition unit 11 and each time required for various detailed processing on the index block. Respectively. Specifically, it takes an average time (child block search time (d)) to specify a certain child block (one block lower) from a certain branch block, and to specify a target entry in a leaf block. The average time (leaf block scanning time (s)) and the average time (entry insertion time (i)) required to insert the target entry into the leaf block are calculated.
  • the method for calculating the child block search time (d), the leaf block scanning time (s), and the entry insertion time (i) depends on the configuration mode data indicating the configuration mode employed in the index block to be predicted. Can be switched. Specifically, a calculation reflecting the processing contents of the full search method is executed for an index block that employs the full search method, and a binary operation is performed for an index block that employs the binary search method. Calculations that reflect the processing contents of the search method are executed. Similarly, in order to obtain the entry insertion time, a calculation reflecting the processing contents in the entry insertion method adopted for the index block is executed.
  • the average processing time (t) per operation for the index block is calculated in a state where the configuration mode of the index block and the operation method for the index block are reflected. Therefore, according to the first embodiment, it is possible to predict with high accuracy the time required for an operation on a database to which an index having a tree structure is assigned.
  • the prediction device 10 according to the second embodiment will be described focusing on the content different from the first embodiment.
  • the prediction apparatus 10 according to the second embodiment predicts the time required for an operation on a database to which an index having a tree structure is added, further considering the time required for block division processing at the time of entry insertion.
  • the same contents as those in the first embodiment are omitted as appropriate.
  • FIG. 3 is a diagram conceptually illustrating a configuration example of the prediction device 10 in the second embodiment.
  • the prediction device 10 in the second embodiment further includes a division time calculation unit 21 in addition to the configuration of the first embodiment.
  • the divided time calculation unit 21 is also realized by the CPU 1 executing a program stored in the memory 2.
  • the data acquisition unit 11 further acquires the maximum number of entries (k) of each block and the number of block divisions per operation (j) for each index block in addition to the information given in the first embodiment. Further, the data acquisition unit 11 in the second embodiment acquires the average number of entries (m) per block by calculation using the acquired maximum number of entries (k) of each block. Specifically, the data acquisition unit 11 calculates by multiplying the maximum number of entries (k) of each block by a predetermined usage rate per block. The predetermined usage rate may be stored in advance by the data acquisition unit 11 and is set to 0.75, for example.
  • the division time calculation unit 21 uses the latency (L), entry processing time (a), and the maximum number of entries (k) of each block acquired by the data acquisition unit 11 to calculate the average for one block division process.
  • a division processing unit time (c) indicating time is calculated.
  • the division time calculation unit 21 calculates the division processing unit time (c) by switching and executing at least two types of calculation methods according to the configuration mode data acquired by the data acquisition unit 11.
  • the division time calculation unit 21 corresponds to each of at least two block division methods indicated by the at least two configuration modes, and includes latency (L), entry processing time (a), and maximum number of entries in each block (k). It has at least two kinds of calculation methods using.
  • the division time calculation unit 21 in the present embodiment has two types of calculation methods corresponding to two different block division methods depending on whether or not the entries in the block are sorted.
  • Examples of at least two types of calculation methods possessed by the division time calculation unit 21 are given below.
  • An example of the calculation method corresponding to the first configuration mode is (Formula 6) below, and an example of the calculation method corresponding to the second configuration mode is (Formula 7) below.
  • c (L + 1.5 * a) * k (Formula 6)
  • c a * k + 2L (Formula 7)
  • the block division processing is performed when the number of entries in the block is the maximum number of entries.
  • the block division processing refers to all the entries to identify the entry to be moved, and half Suppose that the entry of is moved. That is, in this assumption, only half of the entries are referred to in the division target block, and reference and writing are performed on the remaining half of the entries. Therefore, in the block division processing indicated by the first configuration mode, 1.5 times the entry processing time (a) and one latency (L) are required as processing for one entry.
  • the idea that one latency (L) is required per process for one entry is that the ratio of the entry to be moved and the reference-only entry is the same on average, and one latency (L) is 1 for movement and 1 for reference. Based on the idea that two latencies (L) are required.
  • the calculation formula corresponding to the first configuration mode is as shown in (Formula 6).
  • the execution condition for the block division processing is that the ratio of the number of entries in the block to the maximum number of entries exceeds a predetermined ratio ⁇ , and ⁇ is multiplied by the maximum number of entries (k) of each block. ((L + 1.5 * a) * k * ⁇ ). Furthermore, 1.5 may be replaced with another numerical value by changing the ratio of the number of entries to be moved.
  • the numerical value “2” in the second term may be changed by changing the ratio of the number of entries to be moved, or the first term may be multiplied by a predetermined coefficient.
  • the predetermined coefficient to be multiplied by the first term is, for example, that the execution condition of the block division process is that the ratio of the number of entries in the block to the maximum number of entries exceeds the predetermined ratio ⁇ , and the predetermined ratio ⁇ and the number of entries to be moved The value is determined by taking the ratio into account.
  • the processing time estimation unit 18 multiplies the number of block divisions (j) acquired by the data acquisition unit 11 by the division processing unit time (c) calculated by the division time calculation unit 21, thereby performing one operation on the index block. By further calculating the average time required for the block division processing per hit, and further adding the average time required for the block division processing to the total of the other average times described in the first embodiment, Average processing time is calculated.
  • the processing time estimation unit 18 calculates the final average processing time (t) using the following (Equation 8).
  • Equation 8 the last term corresponds to the average time required for block division processing per operation to the index block.
  • t h * d + (1-w) * s + w * i + c * j (Formula 8)
  • FIG. 4 is a diagram illustrating an operation example of the prediction device 10 according to the second embodiment together with a data flow.
  • the data acquisition unit 11 first, the data acquisition unit 11 further acquires the maximum entry number (k) and the block division number (j) per operation in addition to the information described in the first embodiment. (S1).
  • the data acquisition unit 11 calculates the average number of entries (m) per block using the maximum number of entries (k) of each block (S1-1).
  • the division time calculation unit 21 performs the entry processing time (a), the latency (L), and the maximum number of entries in each block. Using (k), a calculation corresponding to the configuration mode data is performed (S2-4). Thereby, in addition to the child block search time (d), the leaf block scanning time (s), and the entry insertion time (i), the division processing unit time (c) is further calculated.
  • the processing time estimation unit 18 adds the value calculated in the first embodiment to the value obtained by multiplying the division processing unit time (c) by the number of block divisions per operation (j), thereby performing the average processing.
  • Time (t) is calculated (S3).
  • the division processing unit time (c) indicating the average time required for one block division processing is calculated by the division time calculation unit 21, and this division processing unit time ( By multiplying c) by the number of block divisions per operation (j), the average time required for block division processing per operation is calculated.
  • the final average processing time (t) is obtained by adding the average time required for the block division processing to the total of the leaf block specific time, entry specific time, and entry insertion time described in the first embodiment. Is calculated.
  • the average processing time (t) per operation on the index block is calculated in a state where the block division processing as the detailed processing of the operation on the index block is also reflected. Therefore, according to the second embodiment, it is possible to predict the time required for an operation on a database to which an index having a tree structure is given with higher accuracy than in the first embodiment.
  • the method of calculating the division processing unit time (c) is switched according to the configuration of the index block that affects the contents of the block division processing.
  • the division processing unit time (c) is calculated by executing the calculation reflecting the processing contents in the block division processing method adopted for the index block. Therefore, according to the second embodiment, it is possible to obtain a highly accurate division processing unit time (c) by considering the configuration of the index block.
  • the prediction device 10 according to the third embodiment will be described focusing on the contents different from the first embodiment and the second embodiment.
  • the prediction device 10 in the third embodiment predicts the time required for the operation on the database, further considering the physical arrangement of the index blocks.
  • the same contents as those in the first embodiment and the second embodiment are omitted as appropriate.
  • FIG. 5 is a diagram conceptually illustrating a configuration example of the prediction device 10 in the third embodiment.
  • the prediction device 10 according to the third embodiment further includes an additional time calculation unit 31 in addition to the configuration of the second embodiment.
  • the additional time calculation unit 31 is also realized by the CPU 1 executing a program stored in the memory 2.
  • the data acquisition unit 11 indicates the probability that the target part of the index block is not stored in the first storage medium and the target part needs to be transferred from the second storage medium.
  • the cache miss rate (1-H) and the data transfer time (u) per block from the second storage medium to the first storage medium are further acquired.
  • the data acquisition unit 11 acquires the first latency (L) related to the first storage medium and the second latency (L ′) related to the second storage medium as the latency (L) mentioned in the first embodiment.
  • the data acquisition unit 11 acquires a cache hit rate (H) indicating the probability that the target part of the index block is stored in the first storage medium and the target part does not need to be transferred from the second storage medium.
  • the cache miss rate (1-H) may be calculated from the cache hit rate (H).
  • the first storage medium is a storage medium that is faster than the second storage medium, and means a storage medium that stores a part of the index block stored in the second storage medium.
  • the first storage medium is a memory (DIMM DDR3)
  • the second storage medium is a disk (SATA).
  • the first storage medium may be a cache (L2)
  • the second storage medium may be a flash memory.
  • the first storage medium is called main memory, main memory, primary storage, etc.
  • the second storage medium is called auxiliary storage, secondary storage, etc. This embodiment does not limit specific implementation forms of the first storage medium and the second storage medium.
  • the additional time calculation unit 31 does not store the target index block in the first storage medium, and the time required to transfer and store the target index block from the second storage medium to the first storage medium (hereinafter, The additional time related to the cache miss is calculated by multiplying the cache miss rate by the cache miss rate.
  • the cache miss time is the data required to transfer the target index block from the second storage medium to the first storage medium to the second latency (L ′) required to access the second storage medium. Calculated by adding the transfer time (u).
  • the search time calculation unit 15 adds the additional time (u) calculated by the additional time calculation unit 31 to the child block search time (d) and the leaf block scanning time (s) calculated by the method described in the first embodiment. Are added to calculate the child block search time (d ′) and the leaf block scanning time (s ′) in the third embodiment. For example, the search time calculation unit 15 calculates the child block search time (d ′) and the leaf block scanning time (s ′) using the following (Equation 9).
  • d ′ d + (L ′ + u) * (1 ⁇ H)
  • s ′ s + (L ′ + u) * (1 ⁇ H) (formula 9)
  • the insertion time calculation unit 16 adds the additional time (u) calculated by the additional time calculation unit 31 to the entry insertion time (i) calculated by the method described in the first embodiment, thereby performing the third implementation.
  • the entry insertion time (i ′) in the form is calculated.
  • the insertion time calculation unit 16 calculates the entry insertion time (i ′) using the following (Equation 10).
  • i ′ i + (L ′ + u) * (1 ⁇ H) (Formula 10)
  • the divided time calculation unit 21 adds the additional time (u) calculated by the additional time calculation unit 31 to the divided processing unit time (c) calculated by the method described in the second embodiment, thereby The division processing unit time (c ′) in the embodiment is calculated.
  • the division time calculation unit 21 calculates the division processing unit time (c) using the following (Equation 11).
  • c ′ c + (L ′ + u) * (1 ⁇ H) (Formula 11)
  • the processing time estimation unit 18 calculates the child block search time (d ′), leaf block scanning time (s ′), entry insertion time (i ′), and divided processing unit time (c ′) calculated in this way.
  • the average processing time (t) per operation for the index block is calculated.
  • the processing time estimation unit 18 calculates the average processing time (t) using the following (Equation 12).
  • t h * d ′ + (1 ⁇ w) * s ′ + w * i ′ + c ′ * j (Formula 12)
  • FIG. 6 is a diagram illustrating an operation example of the prediction apparatus 10 according to the third embodiment together with a data flow.
  • the data acquisition unit 11 acquires the data transfer time (u) and the cache miss rate (1-H) per block in addition to the information described in the second embodiment.
  • the first latency (L) and the second latency (L ′) are acquired as the latency (L) in the first embodiment.
  • the additional time calculation unit 31 performs the second latency (L ′), the data transfer time per block (u), and Using the cache miss rate (1-H), an additional time related to the cache miss is calculated (S2-5).
  • the search time calculation unit 15, the insertion time calculation unit 16, and the division time calculation unit 21 perform the child block search time (d), the leaf block scanning time (s), and the entry insertion time (i).
  • the additional time is added to the divided processing unit time (c) (S3).
  • the processing time estimation unit 18 uses the child block search time (d ′), the leaf block scanning time (s ′), the entry insertion time (i ′), and the divided processing unit time (c ′) to which the additional time is added.
  • the average processing time (t) is calculated (S4).
  • the processing time peculiar to a cache miss is calculated as the additional time (u), and the time required for various processes (child block search time (d ′), Leaf block scanning time (s ′), entry insertion time (i ′), and division processing unit time (c ′)) are calculated.
  • the final average processing time (t) can be calculated in a state in which the contents of each processing at the time of cache hit and cache miss are reflected. That is, according to the third embodiment, it is possible to predict the time required for the operation on the database with higher accuracy than in the first and second embodiments in consideration of the physical arrangement of the index blocks.
  • the prediction device 10 according to the fourth embodiment will be described focusing on the content different from the first embodiment to the third embodiment.
  • the fourth embodiment predicts the time required for the operation on the database in consideration of the physical arrangement of the index blocks in a configuration different from the third embodiment.
  • the same contents as those in the first to third embodiments are omitted as appropriate.
  • FIG. 7 is a diagram conceptually illustrating a configuration example of the prediction device 10 in the fourth embodiment.
  • the prediction device 10 according to the fourth embodiment includes a data acquisition unit 41, an individual time calculation unit 42, an additional time calculation unit 43, a processing time estimation unit 44, and the like. Each of these processing units is realized by the CPU 1 executing a program stored in the memory 2.
  • the data acquisition unit 41 relates to the index block of the database to be predicted, the write ratio (w) indicating the ratio of the insert operation to the total operation, the average branch block height (h), and the second latency (L ′ for the second storage medium). ), The cache miss rate (1-H) indicating the probability that the target part of the index block is not stored in the first storage medium and the target part needs to be transferred from the second storage medium, and the second storage medium The data transfer time (u) per block to the first storage medium is acquired.
  • the write ratio (w), the average branch block height (h), the second latency (L ′), the cache miss rate (1-H), and the data transfer time (u) are the same as those in the first embodiment and the first embodiment. This is the same as in the third embodiment.
  • the data acquisition unit 41 has a primary child block search time (d) indicating an average time taken to specify a child block (another branch block or leaf block) from the branch blocks stored in the first storage medium, Primary leaf block scanning time (s) indicating the average time taken to identify the target entry in the leaf block stored in the first storage medium, and the target entry is inserted into the leaf block stored in the first storage medium.
  • the primary entry insertion time (i) indicating the average time taken for the above is acquired.
  • the data acquisition unit 41 acquires each piece of information as described above when the user inputs using a user interface device connected to the input / output I / F 3. In this case, the data acquisition unit 41 displays a screen for inputting each information on a display device (not shown), and acquires the data input on this screen as each information described above. Moreover, the data acquisition part 41 may acquire each information from other apparatuses via communication, and may acquire it from the portable storage medium which stores each information. Further, the data acquisition unit 41 calculates the child block search time (d), the leaf block scanning time (s) and the entry insertion time (i) calculated by the same method as in the first embodiment as the primary child block search time ( d) You may acquire as primary leaf block scanning time (s) and primary entry insertion time (i).
  • the additional time calculation unit 43 calculates the additional time related to the cache miss by the same method as in the third embodiment.
  • the individual time calculation unit 42 adds the additional time calculated by the additional time calculation unit 43 to the primary child block search time (d), the primary leaf block scanning time (s), and the primary entry insertion time (i), respectively. By adding, the secondary child block search time (d ′), the secondary leaf block scanning time (s ′), and the secondary entry insertion time (i ′) are calculated. This calculation in the individual time calculation unit 42 is the same as (Equation 9) and (Equation 10) in the third embodiment.
  • the first term (h * d ′) in (Equation 13) above indicates the average time taken to identify the target leaf block per operation for the index block.
  • the second term ((1-w) * s ′) indicates the average time taken to search for the target entry in the specified leaf block per operation for the index block.
  • the third term (w * i ′) indicates the average time taken to insert the target entry in the specified leaf block per operation to the index block.
  • FIG. 8 is a diagram illustrating an operation example of the prediction apparatus 10 according to the fourth embodiment together with a data flow.
  • the data acquisition unit 41 performs second latency (L ′) regarding the second storage medium, data transfer time per block (u), cache miss rate (1 ⁇ H), average branch block height. (H)
  • the write ratio (w) is acquired (S1).
  • the data acquisition unit 41 further acquires a primary child block search time (d), a primary leaf block scanning time (s), and a primary entry insertion time (i) (S1).
  • the additional time calculation unit 43 calculates the additional time as in the third embodiment (S2).
  • the individual time calculation unit 42 adds the primary child block search time (d), the primary leaf block scanning time (s), and the primary entry insertion time (i) acquired by the data acquisition unit 11.
  • the secondary child block search time (d ′), the secondary leaf block scanning time (s ′), and the secondary entry insertion time (i ′) are calculated (S3).
  • the processing time estimation unit 44 calculates the secondary child block search time (d ′), the secondary leaf block scanning time (s ′), and the secondary entry insertion time (i) calculated by the individual time calculation unit 42. ') And the average branch block height (h) and write ratio (w) acquired by the data acquisition unit 41 are used to calculate the average processing time (t) (S4).
  • the processing time peculiar to a cache miss is calculated as the additional time (u), and the time required for various processing (secondary child block search time (d ′)) including this additional time.
  • Secondary leaf block scanning time (s ′) and secondary entry insertion time (i ′)) are respectively calculated.
  • the primary child block search time (d), the primary leaf block scanning time (s), and the primary entry insertion time (i) used for calculating the time required for these various processes. Can be acquired by various methods other than the method of the first embodiment.
  • the final average processing time (t) can be calculated in a state in which the contents of each processing at the time of cache hit and cache miss are reflected. It can be estimated with high accuracy.
  • the prediction device 10 according to the fifth embodiment will be described focusing on the content different from the fourth embodiment.
  • the fifth embodiment further has a configuration for calculating the time required for block division processing at the time of entry insertion.
  • the same contents as those of the other embodiments are omitted as appropriate.
  • the prediction device 10 in the fifth embodiment has the same configuration as that in the fourth embodiment (see FIG. 7).
  • the data acquisition unit 41 further acquires the number of block divisions per operation to the index block (j) and the primary division processing unit time (c) indicating the average time required for one block division process. These pieces of information are also acquired by various methods as in the fourth embodiment.
  • the primary division processing unit time (c) may be calculated by the same method as in the second embodiment (see (Expression 6) and (Expression 7) above).
  • the individual time calculation unit 42 further calculates a secondary division processing unit time (c ′) in addition to the processing in the fourth embodiment.
  • the secondary division processing unit time (c ′) is calculated by adding the additional time to the primary division processing unit time (c).
  • the processing time estimation unit 44 further calculates an average time required for block division processing per operation on the index block in addition to the processing in the fourth embodiment.
  • the average time is calculated by multiplying the secondary division processing unit time (c ′) calculated by the individual time calculation unit 42 by the number of block divisions (j) per operation for the index block.
  • the processing time estimation unit 44 estimates the average processing time per operation on the index block by further adding the average time required for block division processing to the total of other average times. Specifically, the processing time estimation unit 44 calculates the average processing time (t) using the above (Equation 12).
  • FIG. 9 is a diagram illustrating an operation example of the prediction device 10 according to the fifth embodiment together with a data flow.
  • the data acquisition unit 41 further acquires the primary division processing unit time (c) and the number of block divisions per operation (j) in addition to the information given in the fourth embodiment (S1). ).
  • the additional time calculation unit 43 adds the additional time to the primary division processing unit time (c) in addition to the calculation processing in the fourth embodiment.
  • the secondary division processing unit time (c ′) is further calculated (S3).
  • the processing time estimation unit 44 further uses the secondary division processing unit time (c ′) and the number of block divisions per operation (j) to calculate the average processing time ( t) is calculated (S4).
  • the average time required for one block division process is calculated in a form including the additional time, and the block division process per operation for the index block is performed according to the calculation result. Such an average time is calculated.
  • the average processing time (t) per operation for the index block is calculated by using this calculation result in addition to the configuration in the fourth embodiment.
  • the final average processing time (t) can be calculated in a state where not only the physical arrangement of data but also the block division processing is reflected. Such time can be estimated with high accuracy.
  • the data acquisition units 11 and 41 acquire the write ratio (w). However, the data acquisition units 11 and 41 acquire the search ratio (r) for all operations, and write using the search ratio (r).
  • the ratio (w) may be calculated (1-r). Further, the write ratio (w) and the search ratio (r) are respectively acquired, and the acquired search ratio (r) is (1) in the above (Expression 5), (Expression 8), (Expression 12), and (Expression 13). -W) may be used.
  • the data acquisition units 11 and 41 in each of the above-described embodiments indicate the block size (b) indicating the average size per block, the entry size (e) indicating the size per entry, and the data transfer rate from the storage medium.
  • the band (B) may be further acquired.
  • the data acquisition units 11 and 41 calculate the maximum number of entries (k) of each block by dividing the acquired block size (b) by the entry size (e), and the entry size (e ) May be calculated by dividing the bandwidth (B) by the entry processing time (a).
  • the entry processing time (a) is calculated as the transfer time of one entry data. This is based on the assumption that in the entry process, the time required for data transfer occupies more than the time required for data manipulation.
  • the data acquisition units 11 and 41 in each of the above embodiments further acquire the total number of entries (n) in the index block, and use the total number of entries (n) and the average number of entries per block (m).
  • the average branch block height (h) may be calculated by calculating the following (formula 14).
  • the data acquisition units 11 and 41 in each of the above embodiments calculate the number of block divisions per operation (j) for the index block, the total number of entries in the index block (n), and the average number of entries per block (m ) And the write ratio (w) may be used to calculate the following (formula 15).
  • j ⁇ (n ⁇ m) / (m ⁇ 1) ⁇ * (w / n) (Formula 15) (Equation 15) can be derived as follows. If all block division times in the target index block are set as j ′, the total block division number j ′ is expressed by the following equation from the number of entries in the block and the height of the branch block. The following formula reflects the following way of thinking. That is, the total number of entries n equals m h + 1, the number of all blocks is (1 + m + m 2 + ⁇ + m h), all the blocks divided number j 'is 1 less than the number of blocks.
  • the number of block divisions per operation (j) can be obtained by dividing the total number of block divisions j ′ by the number of processes.
  • the number of processes is a value obtained by dividing the total number of entries (n) by the write ratio (w).
  • the second latency (L ′) may be set to the sum of the average seek time and the average rotation waiting time.
  • a database performance prediction apparatus for a database including an index block having a tree structure, Regarding the index block, configuration mode data indicating any one of at least two configuration modes, average number of entries per block (m), entry processing time (a) indicating average processing time per entry, insertion for all operations
  • a data acquisition means for acquiring a write ratio (w) indicating an operation ratio, a latency (L) relating to a storage medium in which the index block is stored, and an average branch block height (h); Corresponding to at least two search methods related to the at least two configuration modes, and using the latency (L), the entry processing time (a), and the average number of entries per block (m), at least 2 It has various calculation methods, and it is necessary to specify a target entry in a block, which is calculated by switching and executing the at least two calculation methods according to the configuration mode data acquired by the data acquisition means.
  • Search time calculating means for acquiring the average time as a child block search time (d) and a leaf block scanning time (s); At least two types of calculation methods corresponding to at least two entry insertion methods related to the at least two configuration modes, the calculation method using the latency (L) and the entry processing time (a); and Configuration having the at least two calculation methods including the calculation method using the latency (L), the entry processing time (a), and the average number of entries per block (m), and acquired by the data acquisition unit
  • An insertion time calculating means for obtaining an entry insertion time (i) indicating an average time taken to insert a target entry into a leaf block by switching and executing the at least two kinds of calculation methods according to data; Multiplying the average branch block height (h) and the child block search time (d) to calculate the average time taken to identify the target leaf block per operation to the index block, Using the leaf block scanning time (s) and the write ratio (w), an average time required to search for the target entry in the specified leaf block per operation for the index block is
  • the at least two types of calculation methods possessed by the search time calculation means are: A method of adding a value obtained by multiplying the latency (L) by the entry processing time (a) and the average number of entries per block (m); A method of multiplying a value obtained by adding the latency (L) and the entry processing time (a) by an average number of comparisons when a binary search is performed on the average number of entries per block (m).
  • the at least two types of calculation methods possessed by the insertion time calculation means are: A method of adding the latency (L) and the entry processing time (a); A value obtained by multiplying the average time taken to specify the target entry in the block calculated by the search time calculation means by the entry processing time (a) and the average number of entries per block (m).
  • a method of adding The database performance prediction apparatus according to supplementary note 1 including:
  • the data acquisition means further acquires the maximum number of entries (k) for each block and the number of block divisions (j) per operation for the index block, and the maximum number of entries (k) for each block. Is multiplied by a predetermined usage rate per block to obtain the average number of entries per block (m),
  • the database performance prediction device Corresponding to each of at least two block division methods related to the at least two configuration modes, and using the latency (L), the entry processing time (a), and the maximum number of entries (k) of each block , Having at least two types of calculation methods, and switching and executing the at least two types of calculation methods in accordance with the configuration mode data acquired by the data acquisition means, thereby obtaining an average time required for one block division process
  • the processing time estimation means performs block division processing per operation on the index block by multiplying the division processing unit time (c) by the number of block divisions per operation (j) on the index block. Further calculating the
  • the at least two types of calculation methods possessed by the division time calculation means are: Including calculation of the following two equations using the latency (L), the entry processing time (a), and the maximum number of entries (k) of each block, The database performance prediction apparatus according to attachment 3.
  • the data acquisition means includes a first latency relating to the first storage medium, a second latency relating to the second storage medium, and the target portion of the index block is not stored in the first storage medium. Further acquiring a cache miss rate indicating a probability that the target portion needs to be transferred from the medium, and a data transfer time per block from the second storage medium to the first storage medium;
  • the database performance prediction device An addition for calculating an additional time for a cache miss by multiplying the second latency by a value obtained by adding a data transfer time per block from the second storage medium to the first storage medium and the cache miss rate.
  • the search time calculation means includes the additional time in the child block search time (d) and the leaf block scanning time (s),
  • the insertion time calculation means includes the additional time in the entry insertion time (i),
  • the division time calculation means includes the additional time in the division processing unit time (c).
  • the database performance prediction apparatus according to appendix 3 or 4.
  • a write ratio (w) and an average branch block height (h) indicating the ratio of the insert operation to the total operation are obtained, the second latency for the second storage medium, and the index block of the index block in the first storage medium Cache miss rate indicating the probability that the target part is not stored and the target part needs to be transferred from the second storage medium, and data transfer per block from the second storage medium to the first storage medium
  • First data acquisition means for acquiring time; Primary child block search time (d) indicating an average time taken to specify a child block from blocks stored in the first storage medium, and a target entry is specified in a leaf block stored in the first storage medium
  • Second data acquisition means for acquiring An addition for calculating an additional time for a cache
  • Time calculation means By adding the additional time to the primary child block search time (d), the primary leaf block scanning time (s) and the primary entry insertion time (i), the secondary child block search time (d ') Individual time calculating means for calculating the secondary leaf block scanning time (s') and the secondary entry insertion time (i'); Multiplying the secondary child block search time (d ′) and the average branch block height (h) to calculate the average time taken to identify the target leaf block per operation for the index block Then, using the secondary leaf block scanning time (s ′) and the write ratio (w), the average time taken to search for the target entry in the specified leaf block per operation for the index block , And using the secondary entry insertion time (i ′) and the write ratio (w), it takes to insert the target entry in the specified leaf block per operation to the index block The average time is calculated, and the total of the calculated average times is used as the average processing time per operation for the index block.
  • a constant processing time estimation unit A database performance prediction apparatus comprising:
  • the first data acquisition means further acquires the number of block divisions (j) per operation to the index block
  • the second data acquisition means further acquires a primary division processing unit time (c) indicating an average time required for one block division processing
  • the individual time calculating means calculates a secondary divided processing unit time (c ′) by adding the additional time to the primary divided processing unit time (c)
  • the processing time estimating means multiplies the secondary division processing unit time (c ′) by the number of block divisions per operation (j) for the index block, thereby obtaining a block per operation for the index block. Further calculating an average time required for the division processing, and further adding the average time to the total of other average times, thereby estimating an average processing time per operation to the index block.
  • the database performance prediction apparatus according to attachment 6.
  • the data acquisition means further acquires the total number of entries (n) in the index block, and determines the number of block divisions (j) per operation to the index block as the total number of entries (n), Including a division number calculating means obtained by the following equation using the average number of entries per block (m) and the write ratio (w):
  • j ⁇ (n ⁇ m) / (m ⁇ 1) ⁇ * (w / n)
  • the data acquisition means includes a block size (b) indicating an average size per block, an entry size (e) indicating a size per entry, and a bandwidth (B) indicating a data transfer rate from the storage medium. Further, the maximum number of entries (k) of each block is obtained by dividing the block size (b) by the entry size (e), and the entry size (e) is divided by the bandwidth (B).
  • the database performance prediction apparatus according to any one of supplementary notes 3 to 5, 7 and 8, wherein the entry processing time (a) is acquired by doing so.
  • the said data acquisition means further acquires the total number of entries (n) in the said index block, and calculates the following formula using the average number of entries per said block (m) and this total number of entries (n)
  • configuration mode data indicating any one of at least two configuration modes, average number of entries per block (m), entry processing time (a) indicating average processing time per entry, insertion for all operations
  • w write ratio
  • L latency
  • h average branch block height
  • the average time taken to specify the target entry in the block, which is calculated by switching and executing various calculation methods according to the configuration mode data, is the child block search time (d) and the leaf block scanning time.
  • the entry insertion time (i) indicating the average time taken to insert the target entry into the leaf block
  • Using the leaf block scanning time (s) and the write ratio (w) an average time taken to search for the target entry in the specified leaf block per operation for the index block is calculated
  • Using the entry insertion time (i) and the write ratio (w) calculate the average time taken to insert the target entry within the specified leaf block per operation to the index block, Estimating the total of the calculated average times as the average processing time per operation on the index block; Database performance prediction method.
  • the at least two types of calculation methods corresponding to the at least two search methods are: A method of adding a value obtained by multiplying the latency (L) by the entry processing time (a) and the average number of entries per block (m); A method of multiplying a value obtained by adding the latency (L) and the entry processing time (a) by an average number of comparisons when a binary search is performed on the average number of entries per block (m).
  • the at least two calculation methods corresponding to the at least two entry insertion methods are: A method of adding the latency (L) and the entry processing time (a); A value obtained by multiplying the average time taken to specify the target entry in the block calculated by the search time calculation means by the entry processing time (a) and the average number of entries per block (m).
  • a method of adding The database performance prediction method according to appendix 11, including:
  • the computer Further obtain the maximum number of entries (k) of each block and the number of block divisions (j) per operation to the index block, and multiply the maximum number of entries (k) of each block by a predetermined usage rate per block.
  • the division processing unit time (c) indicating the average time required for one block division processing is obtained by switching and executing at least two kinds of calculation methods according to the configuration mode data acquired by the data acquisition means.
  • the at least two types of calculation methods corresponding to the at least two block division methods are: Including calculation of the following two equations using the latency (L), the entry processing time (a), and the maximum number of entries (k) of each block, The database performance prediction method according to attachment 13.
  • the first latency for the first storage medium, the second latency for the second storage medium, the target portion of the index block is not stored in the first storage medium, and it is necessary to transfer the target portion from the second storage medium Obtaining a cache miss rate indicating a certain probability and a data transfer time per block from the second storage medium to the first storage medium; Multiplying the second latency to a value obtained by adding the data transfer time per block from the second storage medium to the first storage medium and the cache miss rate to calculate an additional time related to a cache miss, The additional time is included in the child block search time (d), the leaf block scanning time (s), the entry insertion time (i), and the division processing unit time (c), respectively.
  • the database performance prediction method according to supplementary note 13 or 14, further including:
  • a database performance prediction method for a database including a tree-structured index block Computer For the index block, obtain a write ratio (w) and an average branch block height (h) indicating the ratio of the insert operation to the total operation, A second latency with respect to the second storage medium, a cache miss rate indicating a probability that the target portion of the index block is not stored in the first storage medium and the target portion needs to be transferred from the second storage medium, and Obtaining a data transfer time per block from the second storage medium to the first storage medium; Primary child block search time (d) indicating an average time taken to specify a child block from blocks stored in the first storage medium, and a target entry is specified in a leaf block stored in the first storage medium Primary leaf block scanning time (s) indicating the average time taken to perform, and primary entry insertion time (i) indicating the average time taken to insert the target entry into the leaf block stored in the first storage medium Get Multiplying the second latency to a value obtained by adding the data transfer time per
  • the average time required to insert the target entry in the specified leaf block per operation to the index block is calculated. And Estimating the total of the calculated average times as an average processing time per operation on the index block; Database performance prediction method.
  • the computer Obtaining the number of block divisions (j) per operation to the index block; Obtaining a primary division processing unit time (c) indicating an average time required for one block division processing; A secondary divided processing unit time (c ′) is calculated by adding the additional time to the primary divided processing unit time (c), By multiplying the secondary division processing unit time (c ′) by the number of block divisions per operation to the index block (j), the average time required for block division processing per operation to the index block is obtained. calculate, Further including The estimation of the average processing time per operation is performed by further adding the average time required for block division processing per operation to the index block to the total of the other average times, thereby obtaining the per-operation per index block. Estimate the average processing time, The database performance prediction method according to attachment 16.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

データベース性能予測装置は、少なくとも2種の計算手法を構成態様データに応じて切り換えて実行することにより、子ブロック検索時間(d)及びリーフブロック走査時間(s)を取得する手段と、少なくとも2種の計算手法を構成態様データに応じて切り換えて実行することによりエントリ挿入時間(i)を取得する手段と、インデックスブロックへの1操作当たりにおける、対象リーフブロックを特定するのにかかる平均時間、特定されたリーフブロック内で対象エントリを検索するのにかかる平均時間、特定されたリーフブロック内で対象エントリを挿入するのにかかる平均時間をそれぞれ算出し、算出された各平均時間の合計を、インデックスブロックへの1操作当たりの平均処理時間として推定する手段と、を備える。

Description

データベース性能予測装置及びデータベース予測方法
 本発明は、インデックスブロックが付与されたデータベース性能の予測技術に関する。
 ツリー型のインデックスとして、Bツリーインデックスが広く用いられている。下記非特許文献1には、Bツリーを用いた検索、及び、Bツリーへのデータの挿入と削除のアルゴリズムが記載されている。また、下記非特許文献2には、広く用いられている関係データベースのORACLE(登録商標)におけるBツリーの説明が記載されている。
 図10には、下記非特許文献2の図5から図7を参考にしたBツリーインデックスの構成例が示される。ORACLE(登録商標)では、或る単位(例えば8KB)で記憶領域が管理され、この単位がブロックと呼ばれる。ブロックには、データブロック、リーフブロック、ブランチブロックの三種類が含まれる。データブロックには、データ行全体が格納される。インデックスは、リーフブロック及びブランチブロックに格納される。よって、リーフブロック及びブランチブロックはインデックスブロックとも呼ばれる。リーフブロックは、インデックスブロックの中の最下層のブロックである。ブランチブロックは、リーフブロック又は他のブランチブロックへのリンクを持つブロックである。
 リーフブロックとブランチブロックには、インデックスとなる少なくとも1つのエントリが格納される。最上位のブランチブロックは特にルートブロックと呼ばれる場合がある。各エントリは、検索対象となる列の値(以降キーと呼ぶ)及び識別子(ID)をそれぞれ含む。識別子は、データ行又は他のブロックを特定するためのデータである。リーフブロックのエントリに含まれる識別子は、データブロックのいずれか1つのデータ行を特定し、ブランチブロックのエントリに含まれる識別子は、他のブランチブロックのいずれか1つ又はリーフブロックのいずれか1つを特定する。よって、検索条件を満たすキーを持つリーフブロックを特定するためには、サーチャは、ブランチブロック中のキーをその検索条件のデータと順次比較し、識別子を用いてブランチブロックをたどっていく。
 Bツリーは、低速なハードディスクから高速なメモリへとブロックをコピーするのがボトルネックになることを暗黙に想定して、設計されている。下記非特許文献1の「Balancing」のセクションには、ブロックを読むことはディスクアクセスを伴うため、Bツリーの高さを低く保つことが重要であると記載されている。実際、多くのブロックがハードディスクに記録され、一部のブロックのみがメモリ上にキャッシュされる状況では、ほとんどの場合、ブロックはディスクから読まれる。
 この場合、性能のボトルネックはディスクアクセスとなる。メモリ上のデータへのアクセスのレイテンシとメモリ上のデータのデータ転送速度(帯域)は、ディスクに関するそれらよりも大幅に優れているからである。そこで、各ブロックのサイズをディスクI/Oの単位に合わせることにより、ディスクアクセスの最小化が図られている。
 また、下記非特許文献5から7では、Bツリー等のデータの物理配置の案が提案されている。下記非特許文献5では、参照間隔が5分以下であればハードディスクではなくメモリにデータを置くことが有効であること(5分ルール)、10バイトをメモリに置くことで毎秒1命令を削減できるのであればメモリを余分に利用したとしても有効であることが提案されている。
 上記5分ルールについて更に説明する。5分ルールとは、以下の条件式が満たされるか否かが、データをメモリに置くことに対して採算が取れるか否かの分岐点であり、参照間隔Rが5分の場合に当該条件式が満たされるというものである。
 (A/R)-(M*B)=0
 B<Bmax、A=2000、M=0.005、B=1333
 ここで、Rは参照間隔、Mはメモリのバイト単価、Aはディスクの帯域単価、Bはデータサイズ、Bmaxはディスクのブロックサイズを示す。
 下記非特許文献6では、非特許文献1の10年後の環境においては、ランダムにアクセスされるブロックは5分以下、シーケンシャルにアクセスされるブロックは1分以下の参照間隔であれば、ブロックをハードディスクではなくメモリに置くことが有効である旨、記載されている。更に、下記非特許文献6によれば、ディスクの帯域及びレイテンシでモデル化されたブロックアクセスにかかる時間と、ブロックにアクセスすることで検索対象を絞り込める度合いから、適切なBツリーのブロックサイズが求められている。
 下記非特許文献7では、下記非特許文献1の20年後の環境においては、メモリとフラッシュメモリの間に上記5分ルールが成り立つことが記載されている。また、ディスクに置かれたデータをフラッシュメモリに格納するのが有効となる参照間隔が2時間であることも記載されている。下記非特許文献7によれば、Bツリーのブロックサイズに関して、ディスクは512KB、フラッシュメモリは2KBにすることが有効であるとの結果が得られている。
 このようなデータベース性能を向上させ得る技術として、ORACLE(登録商標)のオプティマイザが存在する。下記非特許文献8では、CBO(Cost Base Optimizer)において、SQL文に対応する最適な実行計画を作成するために利用されるオペレーションコストCOSTが以下の式で算出されることが記載されている。
Figure JPOXMLDOC01-appb-M000001
 CPU_COSTはオペレーションに必要なCPU(Central Processing Unit)サイクル数に比例する値であり、IO_COSTはオペレーションによって読み込まれるブロック数に比例する値である。SREADTIMは、単一ブロックのディスクからのランダムリードの平均レスポンス時間(msec)、CPUSPEEDは1秒当たりの平均サイクル数(MHz)である。
 下記非特許文献9では、挿入操作においてアクセスされるブロック数を挿入操作にかかるコストとして次のように計算することが記載されている(pp.20参照)。
 insertion cost = search cost + rewrite data block + rewrite index block + split rewrite = (3 + 1) + 1 + 1 + 2 = 8 (blocks)
 下記非特許文献9によれば、ユーザは、「split rewrite」の数として適切な値を入力する必要があり、Bツリーの高さを3と仮定することにより、「search cost」に3が設定されている。一方、アクセスにかかる時間は一定であると仮定して、この時間は次のように算出される(pp. 371参照)。
 Block access cost = disk access time to a block from a random starting location = average disk seek time + average rotational delay + block transfer
 下記特許文献1では、データベース管理システムに関してアクセス経路を選択する際に、隣接ブロックにアクセスする度合を考慮することが提案されている。下記特許文献1における手法は、ディスクの隣接するブロックにアクセスする時間と、隣接しないブロックにアクセスする時間、各行の処理にかかる時間、アクセスするブロック数、隣接しないブロックへのアクセス数から、大まかな実行時間の予測値を算出する。
特開平2-54347号公報
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 Drepper, U., "What Every Programmer Should Know about Memory", Red Hat Inc., November 21, 2007, http://people.redhat.com/drepper/cpumemory.pdf Mohan, C., "Implications of Storage Class Memories (SCM) on Software Architectures", 13th International Workshop on High Performance Transaction Systems (HPTS), October 2009, http://www.hpts.ws/session2/mohan.pdf Gray, J. and Putzolu, G. F., "The 5 Minute Rule For Trading Memory for Disc Accesses and The 10 Byte Rule for Trading Memory for CPU Time", Proceedings of SIGMOD 87, pp. 395 - 398, June 1987. Gray, J. and Graefe, G., "The Five-Minute Rule Ten Years Later, and Other Computer Storage Rules of Thumb", SIGMOD Record 26, 4, September 1997. Graefe, G., "The Five-Minute Rule Twenty Years Later, and How Flash Memory Changes the Rules", Proceedings of the Third International Workshop on Data Management on New Hardware, June 2007. 小田 圭二, "門外不出のOracle現場ワザ", 第4章 Oracleデータベースの頭脳 「オプティマイザ」徹底研究, http://www.oracle.com/technology/global/jp/pub/jp/db_magazine/mongai/chapter4_2.html#part2 Sam S. Lightstone, Toby J. Teorey, Tom Nadeau., "Physical Database Design: the database professional's guide to exploiting indexes, views, storage, and more (The Morgan Kaufmann Series in Data Management Systems)", Morgan Kaufmann; 4th Revised edition, 2007.
 上述のように、データベースシステムを実現している各種ハードウェア資源の仕様を考慮して、データベースの性能を向上させるための様々な手法が提案されている。例えば、上述の非特許文献5から7において、ハードディスクのような2次記憶(補助記憶)へのアクセスがボトルネックとなる問題を解決するために、データの物理的配置の最適化が提案されている。
 ところが、近年、メモリの低価格化と大容量化に伴い、Bツリーの多くのブロックをメモリに格納することができるようになった。この状況では、ディスクアクセスはデータベース性能のボトルネックにはならない。更に、2次記憶としてのディスクの代わりに、フラッシュメモリを用いることも一般的になってきた。
 上記非特許文献3及び4では、記憶媒体であるキャッシュ、メモリ、フラッシュ及びディスクに関する仕様として、レイテンシ、帯域及び価格が記載されている(図11参照)。例えば、上記非特許文献3によれば、或るCPUのL2キャッシュのデータにアクセスすると、14サイクル以下の遅延が発生する。この遅延は、2.5から3.0(GHz)のCPUでは、概ね0.005(us)に相当する。なお、図11におけるフラッシュのレイテンシは、リードレイテンシである。
 このように、データベースシステムを実現し得るハードウェア環境は多様化している。従って、データベースシステムを実現している環境に応じた適切な手法を選択しなければ、性能向上を果たすことはできない。従って、データベース操作に係る時間のようなデータベース性能を予測することは大変重要である。この点に関し、例えば、上述の特許文献1、非特許文献8及び9では、最適な実行計画を生成するために、操作コストや処理時間が予測されている。
 しかしながら、これら予測手法は精度が低いという問題がある。これら予測手法は、例えば、インデックスブロックの構成態様、インデックスブロックへの操作手法、各操作を形成する詳細処理、インデックスブロックの物理配置等を考慮していないからである。構成態様としては、例えば、各ブロックにおいてエントリがソートされた状態で格納される態様、当該エントリがソートされていない状態で格納される態様が存在する。更に、操作手法としては、例えば、各ブロックの検索において、先頭のエントリから順に検索する手法、二分探索法により検索する手法が存在する。また、他の操作手法として、例えば、エントリの挿入において、空き領域の先頭に挿入する手法、ソートされたエントリ中の適切な位置に挿入する手法が存在する。詳細処理としては、例えば、エントリ挿入時におけるブロック分割処理がある。物理配置とは、対象ブロックが格納されている位置(記憶媒体)である。
 このような各要因は、インデックスブロックが付与されたデータベース性能の予測精度に大きく影響を与える。
 本発明の目的は、ツリー構造を持つインデックスが付与されたデータベースに対する操作にかかる時間を高精度で予測する技術を提供することにある。
 本発明の各態様では、上述した課題を解決するために、それぞれ以下の構成を採用する。
 第1の態様は、ツリー構造のインデックスブロックを含むデータベースのためのデータベース性能予測装置に関する。第1の態様に係るデータベース性能予測装置は、当該インデックスブロックに関し、少なくとも2つの構成態様のいずれか1つを示す構成態様データ、ブロック当たりの平均エントリ数(m)、エントリ当たりの平均処理時間を示すエントリ処理時間(a)、全操作に対する挿入操作の割合を示すライト比率(w)、インデックスブロックが格納される記憶媒体に関するレイテンシ(L)、及び、平均ブランチブロック高さ(h)を取得するデータ取得手段と、上記少なくとも2つの構成態様に関連する少なくとも2つの検索手法に対応し、かつ、レイテンシ(L)、エントリ処理時間(a)及びブロック当たりの平均エントリ数(m)を用いた、少なくとも2種の計算手法を持ち、データ取得手段により取得された構成態様データに応じて少なくとも2種の計算手法を切り換えて実行することにより算出される、ブロック内で対象エントリを特定するのにかかる平均時間を、子ブロック検索時間(d)及びリーフブロック走査時間(s)として、取得する検索時間算出手段と、少なくとも2つの構成態様に関連する少なくとも2つのエントリ挿入手法に対応した少なくとも2種の計算手法であって、前記レイテンシ(L)及び前記エントリ処理時間(a)を用いた計算手法、及び、レイテンシ(L)、エントリ処理時間(a)及びブロック当たりの平均エントリ数(m)を用いた計算手法を含む少なくとも2種の計算手法を持ち、データ取得手段により取得された構成態様データに応じて少なくとも2種の計算手法を切り換えて実行することにより、リーフブロックに対象エントリを挿入するのにかかる平均時間を示すエントリ挿入時間(i)を取得する挿入時間算出手段と、平均ブランチブロック高さ(h)と子ブロック検索時間(d)とを掛け合わせることにより、インデックスブロックへの1操作当たりの対象リーフブロックを特定するのにかかる平均時間を算出し、リーフブロック走査時間(s)とライト比率(w)とを用いて、インデックスブロックに対する1操作当たりの特定されたリーフブロック内で対象エントリを検索するのにかかる平均時間を算出し、エントリ挿入時間(i)とライト比率(w)とを用いて、インデックスブロックへの1操作当たりの特定されたリーフブロック内で対象エントリを挿入するのにかかる平均時間を算出し、このように算出された各平均時間の合計を、インデックスブロックへの1操作当たりの平均処理時間として推定する処理時間推定手段と、を備える。
 第2の態様は、ツリー構造のインデックスブロックを含むデータベースのためのデータベース性能予測装置に関する。第2の態様に係るデータベース性能予測装置は、インデックスブロックに関し、全操作に対する挿入操作の割合を示すライト比率(w)及び平均ブランチブロック高さ(h)を取得し、第2記憶媒体に関する第2レイテンシ、第1記憶媒体にインデックスブロックの対象部分が格納されておらず第2記憶媒体から対象部分を転送する必要のある確率を示すキャッシュミス率、及び、第2記憶媒体から第1記憶媒体へのブロック当たりのデータ転送時間を取得する第1データ取得手段と、第1記憶媒体に格納されるブロックから子ブロックを特定するのにかかる平均時間を示す1次子ブロック検索時間(d)、第1記憶媒体に格納されるリーフブロック内で対象エントリを特定するのにかかる平均時間を示す1次リーフブロック走査時間(s)、第1記憶媒体に格納されるリーフブロックに対象エントリを挿入するのにかかる平均時間を示す1次エントリ挿入時間(i)を取得する第2データ取得手段と、第2レイテンシに、第2記憶媒体から第1記憶媒体へのブロック当たりのデータ転送時間を加算した値に、キャッシュミス率を掛け合わせることにより、キャッシュミスに関する付加時間を算出する付加時間算出手段と、1次子ブロック検索時間(d)、1次リーフブロック走査時間(s)及び1次エントリ挿入時間(i)に付加時間をそれぞれ加算することにより、2次子ブロック検索時間(d')、2次リーフブロック走査時間(s')及び2次エントリ挿入時間(i')を算出する個別時間算出手段と、2次子ブロック検索時間(d')と平均ブランチブロック高さ(h)とを掛け合わせることにより、インデックスブロックへの1操作当たりの対象リーフブロックを特定するのにかかる平均時間を算出し、2次リーフブロック走査時間(s')とライト比率(w)とを用いて、インデックスブロックに対する1操作当たりの特定されたリーフブロック内で対象エントリを検索するのにかかる平均時間を算出し、2次エントリ挿入時間(i')とライト比率(w)とを用いて、インデックスブロックへの1操作当たりの特定されたリーフブロック内で対象エントリを挿入するのにかかる平均時間を算出し、算出された各平均時間の合計を、インデックスブロックへの1操作当たりの平均処理時間として推定する処理時間推定手段と、を備える。
 第3の態様は、ツリー構造のインデックスブロックを含むデータベースのためのデータベース性能予測方法に関する。第3の態様に係るデータベース性能予測方法は、コンピュータが、インデックスブロックに関し、少なくとも2つの構成態様のいずれか1つを示す構成態様データ、ブロック当たりの平均エントリ数(m)、エントリ当たりの平均処理時間を示すエントリ処理時間(a)、全操作に対する挿入操作の割合を示すライト比率(w)、インデックスブロックが格納される記憶媒体に関するレイテンシ(L)、及び、平均ブランチブロック高さ(h)を取得し、少なくとも2つの構成態様に関連する少なくとも2つの検索手法に対応し、かつ、レイテンシ(L)、エントリ処理時間(a)及びブロック当たりの平均エントリ数(m)を用いた、少なくとも2種の計算手法を、構成態様データに応じて切り換えて実行することにより算出される、ブロック内で対象エントリを特定するのにかかる平均時間を、子ブロック検索時間(d)及びリーフブロック走査時間(s)として、取得し、少なくとも2つの構成態様に関連する少なくとも2つのエントリ挿入手法に対応した少なくとも2種の計算手法であって、レイテンシ(L)及びエントリ処理時間(a)を用いた計算手法、及び、レイテンシ(L)、エントリ処理時間(a)及びブロック当たりの平均エントリ数(m)を用いた計算手法を含む少なくとも2種の計算手法を、構成態様データに応じて切り換えて実行することにより、リーフブロックに対象エントリを挿入するのにかかる平均時間を示すエントリ挿入時間(i)を取得し、平均ブランチブロック高さ(h)と子ブロック検索時間(d)とを掛け合わせることにより、インデックスブロックへの1操作当たりの対象リーフブロックを特定するのにかかる平均時間を算出し、リーフブロック走査時間(s)とライト比率(w)とを用いて、インデックスブロックに対する1操作当たりの特定されたリーフブロック内で対象エントリを検索するのにかかる平均時間を算出し、エントリ挿入時間(i)とライト比率(w)とを用いて、インデックスブロックへの1操作当たりの特定されたリーフブロック内で対象エントリを挿入するのにかかる平均時間を算出し、算出された各平均時間の合計を、インデックスブロックへの1操作当たりの平均処理時間として推定する、ことを含む。
 第4の態様は、ツリー構造のインデックスブロックを含むデータベースのためのデータベース性能予測方法に関する。第4の態様に係るデータベース性能予測方法は、コンピュータが、インデックスブロックに関し、全操作に対する挿入操作の割合を示すライト比率(w)及び平均ブランチブロック高さ(h)を取得し、第2記憶媒体に関する第2レイテンシ、第1記憶媒体にインデックスブロックの対象部分が格納されておらず第2記憶媒体から対象部分を転送する必要のある確率を示すキャッシュミス率、及び、第2記憶媒体から第1記憶媒体へのブロック当たりのデータ転送時間を取得し、第1記憶媒体に格納されるブロックから子ブロックを特定するのにかかる平均時間を示す1次子ブロック検索時間(d)、第1記憶媒体に格納されるリーフブロック内で対象エントリを特定するのにかかる平均時間を示す1次リーフブロック走査時間(s)、第1記憶媒体に格納されるリーフブロックに対象エントリを挿入するのにかかる平均時間を示す1次エントリ挿入時間(i)を取得し、第2レイテンシに、第2記憶媒体から第1記憶媒体へのブロック当たりのデータ転送時間を加算した値に、キャッシュミス率を掛け合わせることにより、キャッシュミスに関する付加時間を算出し、1次子ブロック検索時間(d)、1次リーフブロック走査時間(s)及び1次エントリ挿入時間(i)に付加時間をそれぞれ加算することにより、2次子ブロック検索時間(d')、2次リーフブロック走査時間(s')及び2次エントリ挿入時間(i')を算出し、2次子ブロック検索時間(d')と平均ブランチブロック高さ(h)とを掛け合わせることにより、インデックスブロックへの1操作当たりの対象リーフブロックを特定するのにかかる平均時間を算出し、2次リーフブロック走査時間(s')とライト比率(w)とを用いて、インデックスブロックに対する1操作当たりの特定されたリーフブロック内で対象エントリを検索するのにかかる平均時間を算出し、2次エントリ挿入時間(i')とライト比率(w)とを用いて、インデックスブロックへの1操作当たりの特定されたリーフブロック内で対象エントリを挿入するのにかかる平均時間を算出し、算出された各平均時間の合計を、インデックスブロックへの1操作当たりの平均処理時間として推定する、ことを含む。
 なお、本発明の他の態様としては、上記各態様の構成をコンピュータに実現させるコンピュータプログラムであってもよいし、このようなコンピュータプログラムを格納するコンピュータ読み取り可能な記録媒体であってもよい。この記録媒体は、非一時的な有形の媒体を含む。
 上記各態様によれば、ツリー構造を持つインデックスが付与されたデータベースに対する操作にかかる時間を高精度で予測する技術を提供することができる。
図1は、第1実施形態におけるデータベース性能予測装置の構成例を概念的に示す図である。 図2は、第1実施形態におけるデータベース性能予測装置の動作例をデータの流れと共に示す図である。 図3は、第2実施形態におけるデータベース性能予測装置の構成例を概念的に示す図である。 図4は、第2実施形態におけるデータベース性能予測装置の動作例をデータの流れと共に示す図である。 図5は、第3実施形態におけるデータベース性能予測装置の構成例を概念的に示す図である。 図6は、第3実施形態におけるデータベース性能予測装置の動作例をデータの流れと共に示す図である。 図7は、第4実施形態におけるデータベース性能予測装置の構成例を概念的に示す図である。 図8は、第4実施形態におけるデータベース性能予測装置の動作例をデータの流れと共に示す図である。 図9は、第5実施形態におけるデータベース性能予測装置の動作例をデータの流れと共に示す図である。 図10は、Bツリーインデックスの構成例を示す図である。 図11は、各記憶媒体の仕様の例を示す図である。
 以下、本発明の実施の形態について説明する。なお、以下に挙げる各実施形態はそれぞれ例示であり、本発明は以下の各実施形態の構成に限定されない。
 [第1実施形態]
 以下、本発明の第1実施形態としてのデータベース性能予測装置について説明する。第1実施形態におけるデータベース性能予測装置は、データベース性能として、ツリー構造を持つインデックスが付与されたデータベースに対する操作にかかる時間を評価(予測)する。本実施形態では、予測対象のデータベースに付与されるインデックスはツリー構造に格納されるものであればよく、Bツリーと呼ばれる技術に限定されない。
 〔装置構成〕
 図1は、第1実施形態におけるデータベース性能予測装置の構成例を概念的に示す図である。データベース性能予測装置(以降、単に、予測装置と表記する)10は、図1に示すように、ハードウェア構成として、CPU1、メモリ2、入出力インタフェース(I/F)3等を有する。メモリ2は、RAM(Random Access Memory)、ROM(Read Only Memory)、ハードディスク、可搬型記憶媒体等である。入出力I/F3は、他の装置と通信を行う通信装置等と接続される。入出力I/F3は、表示装置や入力装置等のようなユーザインタフェース装置と接続されてもよい。なお、本実施形態は、予測装置10のハードウェア構成を限定しない。
 予測装置10は、ツリー構造のインデックスブロックを含むデータベースの性能予測として、当該インデックスブロックへの1操作当たりの平均処理時間を推定する。予測装置10の予測対象である当該データベースは、予測装置10上で実現されてもよいし、他のコンピュータ上で実現されてもよい。
 予測対象のデータベースは、例えば、図10で示した例のような構成を持つ。以降、インデックスエントリの識別子によりリンクされた各インデックスブロックにおいて、そのインデックスエントリを含むブランチブロックを親ブロックと表記し、そのインデックスエントリの識別子で特定されるリーフブロック又は他のブランチブロックを子ブロックと表記する場合もある。
 第1実施形態における予測装置10は、図1に示されるように、データ取得部11、検索時間算出部15、挿入時間算出部16、処理時間推定部18等を有する。これら各処理部は、メモリ2に格納されるプログラムがCPU1により実行されることにより実現される。当該プログラムは、例えば、CD(Compact Disc)、メモリカード等のような可搬型記録媒体やネットワーク上の他のコンピュータから入出力I/F3を介してインストールされ、メモリ2に格納される。
 データ取得部11は、予測対象のデータベースのインデックスブロックに関し、少なくとも2つの構成態様のいずれか1つを示す構成態様データ、ブロック当たりの平均エントリ数(m)、エントリ当たりの平均処理時間を示すエントリ処理時間(a)、全操作に対する挿入操作の割合を示すライト比率(w)、インデックスブロックが格納される記憶媒体に関するレイテンシ(L)、及び、平均ブランチブロック高さ(h)を取得する。
 構成態様データは、少なくとも2つの構成態様のうち、予測対象のインデックスブロックで採用されている構成態様を特定するためのデータである。ここで、構成態様とは、ブロック内のエントリがソートされているか否か、ブロック内のエントリの検索手法及び操作手法など、予測対象のインデックスブロックで採用され得る形態を意味する。
 第1実施形態では、2つの構成態様がサポートされる。具体的には、第1の構成態様は、ブロック内のエントリがソートされておらず、先頭のエントリから順に検索する手法(以降、全部検索手法と表記する)が検索手法として採用され、空き領域の先頭に挿入する手法がエントリ挿入手法として採用される形態を示す。第2の構成態様は、ブロック内のエントリがソートされており、二分探索法により検索する手法(以降、二分探索手法と表記する)が検索手法として採用され、ソートされたエントリ中の適切な位置に挿入する手法がエントリ挿入手法として採用される形態を示す。なお、本実施形態は、サポートすべき構成態様をこのような2つの構成態様に限定せず、その他の検索手法及びその他のエントリ挿入手法を加えて、3つ以上の構成態様がサポートされてもよい。
 データ取得部11は、入出力I/F3に接続されるユーザインタフェース装置を用いてユーザが入力することにより、上述のような各情報を取得する。この場合、データ取得部11は、各情報を入力する画面を表示装置(図示せず)に表示させ、この画面に入力されたデータを上述の各情報として取得する。また、データ取得部11は、各情報を他の装置から通信を介して取得してもよいし、各情報を格納する可搬型記憶媒体から取得してもよい。
 検索時間算出部15は、データ取得部11により取得された、レイテンシ(L)、エントリ処理時間(a)及びブロック当たりの平均エントリ数(m)を用いて、子ブロック検索時間(d)及びリーフブロック走査時間(s)を算出する。子ブロック検索時間(d)は、或るブランチブロックから或る子ブロック(一段下位のブロック)を特定するのにかかる平均時間を示す。リーフブロック走査時間(s)は、リーフブロック内で対象エントリを特定するのにかかる平均時間を示す。検索時間算出部15は、ブランチブロック内又はリーフブロック内で対象エントリを特定するのにかかる平均時間を、子ブロック検索時間(d)及びリーフブロック走査時間(s)として算出する。
 検索時間算出部15は、上記少なくとも2つの構成態様が示す少なくとも2つの検索手法に対応し、かつ、レイテンシ(L)、エントリ処理時間(a)及びブロック当たりの平均エントリ数(m)を用いた少なくとも2種の計算手法を持つ。例えば、検索時間算出部15は、全部検索手法及び二分探索手法の各々に対応する2種の計算手法を持つ。
 検索時間算出部15は、データ取得部11により取得された構成態様データに応じて少なくとも2種の計算手法を切り換えて実行することによりブロック内で対象エントリを特定するのにかかる平均時間を算出する。検索時間算出部15は、この算出された平均時間を、子ブロック検索時間(d)及びリーフブロック走査時間(s)として取得する。
 検索時間算出部15が持つ少なくとも2種の計算手法の例を以下に挙げる。第1の構成態様(全部検索手法)に対応する計算手法の例が以下の(式1)であり、第2の構成態様(二分探索手法)に対応する計算手法の例が以下の(式2)である。以下の式における「*」は乗算を示す。
 d=L+a*m、s=L+a*m   (式1)
 d=(L+a)*logm、s=(L+a)*logm   (式2)
 全部検索手法に対応する計算では、各ブロックにおいて全エントリが検索されると仮定し、(式1)に示されるように、レイテンシ(L)に、エントリ処理時間(a)とブロック当たりの平均エントリ数(m)とを掛け合わせた値が加算される。一方、二分探索手法に対応する計算では、一回の比較でレイテンシ(L)とエントリ処理時間(a)がかかると仮定し、(式2)に示されるように、レイテンシ(L)とエントリ処理時間(a)とを足し合わせた値に、ブロック当たりの平均エントリ数(m)に関し二分探索を行った際の平均比較回数が掛け合わされる。
 なお、上記(式1)の第2項(a*m)は、対象のエントリが特定されるまでに参照されるエントリ数の精度を上げるための所定の係数(α)を更に掛け合わせた項(α*a*m)とすることもできる。
 挿入時間算出部16は、上記少なくとも2つの構成態様が示す少なくとも2つのエントリ挿入処理に対応した少なくとも2種の計算手法を、データ取得部11により取得された構成態様データに応じて切り換えて実行することにより、リーフブロックに対象エントリを挿入するのにかかる平均時間を示すエントリ挿入時間(i)を算出する。挿入時間算出部16は、少なくとも2種の計算手法として、レイテンシ(L)及びエントリ処理時間(a)を用いた計算手法、及び、レイテンシ(L)、エントリ処理時間(a)及びブロック当たりの平均エントリ数(m)を用いた計算手法を持つ。
 挿入時間算出部16が持つ少なくとも2種の計算手法の例を以下に挙げる。第1の構成態様に対応する計算手法の例が以下の(式3)であり、第2の構成態様に対応する計算手法の例が以下の(式4)である。
 i=L+a   (式3)
 i=(L+a)*logm+a*m   (式4)
 第1の構成態様に対応する計算では、空き領域の先頭に1つのエントリが挿入されるため、空きレイテンシ(L)及びエントリ処理時間(a)が合算される。一方、第2の構成態様に対応する計算では、エントリの挿入箇所を特定するのにかかる時間と、エントリを挿入するために既に格納されているエントリの順番を移動させるのにかかる時間とが合算される。具体的には、(式4)の前半の項が前者の時間を示し、後半の項が後者の時間を示す。(式4)の例によれば、(式4)の前半の項は、(式2)と同じになっている。また、エントリの順番を移動させるのにかかる時間(後半の項)は、移動させる必要のある平均エントリ数(m/2)に、1つのエントリの移動時間(2*a)が掛け合わされることにより算出される(a*m)。1つのエントリの移動時間は、そのエントリを読む時間(a)とそのエントリを移動後の位置に書く時間(a)とを含む。
 なお、上記(式4)の第2項(a*m)は、移動させる必要のある平均エントリ数の精度を上げるための所定の係数(α)を更に掛け合わせたものとすることもできる(α*a*m)。
 処理時間推定部18は、検索時間算出部15により算出された子ブロック検索時間(d)及びリーフブロック走査時間(s)、挿入時間算出部16により算出されたエントリ挿入時間(i)、データ取得部11により取得された情報を用いて、インデックスブロックへの1操作当たりの平均処理時間(t)を算出する。処理時間推定部18は、この算出された時間を当該データベースに対する操作にかかる時間として推定する。なお、推定する時間において、データブロックへの操作にかかる時間が考慮されていないのは、データブロックへの操作にかかる時間がデータベース全体の性能に与える影響が、インデックスブロックへの操作に比較して小さいからである。即ち、データブロックへの操作(処理)よりもインデックスブロックへの操作のほうが実行される頻度が多いからである。
 処理時間推定部18は、インデックスブロックへの1操作を形成する詳細処理毎に、その処理にかかる平均時間をそれぞれ算出し、各平均時間を合算することにより、インデックスブロックへの1操作当たりの平均処理時間(t)を算出する。具体的には、処理時間推定部18は、インデックスブロックへの1操作当たりの対象リーフブロックを特定するのにかかる平均時間(以降、リーフブロック特定時間と表記する)、インデックスブロックに対する1操作当たりの特定されたリーフブロック内で対象エントリを検索するのにかかる平均時間(以降、エントリ特定時間と表記する)、インデックスブロックへの1操作当たりの特定されたリーフブロック内で対象エントリを挿入するのにかかる平均時間(以降、エントリ挿入時間と表記する)を算出する。
 例えば、処理時間推定部18は、以下の(式5)を用いて、最終的な平均処理時間(t)を算出する。
 t=h*d+(1-w)*s+w*i   (式5)
 (式5)に示されるように、処理時間推定部18は、平均ブランチブロック高さ(h)と子ブロック検索時間(d)とを掛け合わせることにより、当該リーフブロック特定時間を算出する(式5の第1項)。処理時間推定部18は、リーフブロック走査時間(s)とライト比率(w)とを用いて、当該エントリ特定時間を算出する(式5の第2項)。処理時間推定部18は、エントリ挿入時間(i)とライト比率(w)とを用いて、当該エントリ挿入時間を算出する(式5の第3項)。
 〔動作例〕
 図2は、第1実施形態における予測装置10の動作例をデータの流れと共に示す図である。予測装置10では、まず、データ取得部11が、構成態様データ、ブロック当たりの平均エントリ数(m)、エントリ処理時間(a)、レイテンシ(L)、平均ブランチブロック高さ(h)及びライト比率(w)を取得する(S1)。
 次に、検索時間算出部15及び挿入時間算出部16が、ブロック当たりの平均エントリ数(m)、エントリ処理時間(a)及びレイテンシ(L)を用いて、構成態様データに対応する計算を行う(S2)。これにより、子ブロック検索時間(d)、リーフブロック走査時間(s)及びエントリ挿入時間(i)が算出される(S2-1、S2-2、S2-3)。処理(S2-1)、(S2-2)及び(S2-3)は並列に実行されてもよいし、所定の順番でシーケンシャルに実行されてもよい。
 最終的に、処理時間推定部18が、処理(S2)で算出された、子ブロック検索時間(d)、リーフブロック走査時間(s)及びエントリ挿入時間(i)と共に、データ取得部11により取得された平均ブランチブロック高さ(h)及びライト比率(w)を用いて、平均処理時間(t)を算出する(S3)。
 〔第1実施形態の作用及び効果〕
 上述のように、第1実施形態における予測装置10では、データ取得部11により取得された情報に基づいて、インデックスブロックに対する各種詳細処理にかかる各時間が検索時間算出部15及び挿入時間算出部16によりそれぞれ算出される。具体的には、或るブランチブロックから或る子ブロック(一段下位のブロック)を特定するのにかかる平均時間(子ブロック検索時間(d))、リーフブロック内で対象エントリを特定するのにかかる平均時間(リーフブロック走査時間(s))及び、リーフブロックに対象エントリを挿入するのにかかる平均時間(エントリ挿入時間(i))が算出される。
 このとき、子ブロック検索時間(d)、リーフブロック走査時間(s)及びエントリ挿入時間(i)を算出する手法は、予測対象のインデックスブロックに採用されている構成態様を示す構成態様データに応じて切り替えられる。具体的には、全部検索手法が採用されるインデックスブロックに対しては、全部検索手法での処理内容が反映された計算が実行され、二分探索手法が採用されるインデックスブロックに対しては、二分探索手法での処理内容が反映された計算が実行される。同様に、エントリ挿入時間を得るために、インデックスブロックに採用されているエントリ挿入手法での処理内容が反映された計算が実行される。
 即ち、第1実施形態では、インデックスブロックの構成態様、インデックスブロックへの操作手法が反映された状態で、インデックスブロックへの1操作当たりの平均処理時間(t)が算出される。従って、第1実施形態によれば、ツリー構造を持つインデックスが付与されたデータベースに対する操作にかかる時間を高精度で予測することができる。
 [第2実施形態]
 以下、第2実施形態における予測装置10について、第1実施形態と異なる内容を中心に説明する。第2実施形態における予測装置10は、エントリ挿入時におけるブロック分割処理にかかる時間を更に考慮して、ツリー構造を持つインデックスが付与されたデータベースに対する操作にかかる時間を予測する。なお、以下の説明では、第1実施形態と同じ内容については適宜省略される。
 〔装置構成〕
 図3は、第2実施形態における予測装置10の構成例を概念的に示す図である。第2実施形態における予測装置10は、第1実施形態の構成に加えて、分割時間算出部21を更に有する。分割時間算出部21についても、メモリ2に格納されるプログラムがCPU1により実行されることにより実現される。
 データ取得部11は、第1実施形態で挙げた情報に加えて、各ブロックの最大エントリ数(k)及びインデックスブロックへの1操作当たりのブロック分割数(j)を更に取得する。また、第2実施形態におけるデータ取得部11は、取得された各ブロックの最大エントリ数(k)を用いた計算により、ブロック当たりの平均エントリ数(m)を取得する。具体的には、データ取得部11は、各ブロックの最大エントリ数(k)にブロック当たりの所定使用率を掛け合わせることにより算出する。この所定使用率は、予めデータ取得部11が保持していればよく、例えば、0.75に設定される。
 分割時間算出部21は、データ取得部11により取得された、レイテンシ(L)、エントリ処理時間(a)及び各ブロックの最大エントリ数(k)を用いて、1回のブロック分割処理にかかる平均時間を示す分割処理単位時間(c)を算出する。分割時間算出部21は、データ取得部11により取得された構成態様データに応じて少なくとも2種の計算手法を切り換えて実行することにより、当該分割処理単位時間(c)を算出する。
 分割時間算出部21は、上記少なくとも2つの構成態様が示す少なくとも2つのブロック分割手法の各々に対応し、かつ、レイテンシ(L)、エントリ処理時間(a)及び各ブロックの最大エントリ数(k)を用いた少なくとも2種の計算手法を持つ。本実施形態における分割時間算出部21は、ブロック内のエントリがソートされているか否かに応じて異なる2つのブロック分割手法の各々に対応する2種の計算手法を持つ。
 分割時間算出部21が持つ少なくとも2種の計算手法の例を以下に挙げる。第1の構成態様に対応する計算手法の例が以下の(式6)であり、第2の構成態様に対応する計算手法の例が以下の(式7)である。
 c=(L+1.5*a)*k   (式6)
 c=a*k+2L   (式7)
 第1の構成態様では、ブロック内のエントリ数が最大エントリ数となっている場合にブロック分割処理が行われ、ブロック分割処理は、移動させるエントリを特定するために全部のエントリを参照し、半数のエントリを移動させると仮定する。即ち、この仮定では、分割対象のブロック内では、半数のエントリには参照のみが行われ、残りの半数のエントリには参照及び書き込みが行われる。よって、第1の構成態様が示すブロック分割処理では、1エントリに対する処理として、1.5倍のエントリ処理時間(a)と1つのレイテンシ(L)とがかかる。1エントリに対する処理当たり1つのレイテンシ(L)がかかるとの考えは、移動させるエントリと参照のみのエントリとの割合が平均で同じになり、かつ、移動で1つのレイテンシ(L)、参照で1つのレイテンシ(L)が必要となるとの考えに基づく。最終的に、最大エントリ数分のエントリに対して上記1エントリ当たりの処理時間がかかるため、第1の構成態様に対応する計算式は、(式6)のようになる。
 なお、上記(式6)は、ブロック分割処理の実行条件を、最大エントリ数に対するブロック内エントリ数の割合が所定割合βを超える場合とし、各ブロックの最大エントリ数(k)にβが掛け合わされた式((L+1.5*a)*k*β)とすることもできる。更に、移動されるエントリ数の割合を代えることにより1.5を他の数値に代えてもよい。
 一方、第2の構成態様では、ブロック内のエントリ数が最大エントリ数となっている場合にブロック分割処理が行われ、ブロック内のエントリはソートされているため、ブロック分割処理は、中央以降に位置するエントリを一括で他のブロックに移動させると仮定する。よって、中央のエントリへのアクセスに1つのレイテンシ(L)がかかり、最初の書き込み(移動)のアクセスに1つのレイテンシ(L)がかかるため、1回のブロック分割処理には2Lかかる。更に、半数のエントリに対して参照及び書き込み(移動)が行われるため、ブロック分割処理における1エントリに対する処理として1エントリ処理時間(a)(=(1/2)*2*a)かかる。結果、第2の構成態様に対応する計算式は、(式7)のようになる。
 (式7)についても同様に、移動されるエントリ数の割合を代えることにより、第2項の数値「2」を代えてもよいし、第1項に所定係数を掛け合わせてもよい。第1項に掛け合わせる所定係数は、例えば、ブロック分割処理の実行条件を、最大エントリ数に対するブロック内エントリ数の割合が所定割合βを超える場合とし、この所定割合βと移動されるエントリ数の割合とを加味した値に決定される。
 処理時間推定部18は、データ取得部11により取得されたブロック分割数(j)を分割時間算出部21で算出された分割処理単位時間(c)に掛け合わせることにより、インデックスブロックへの1操作当たりのブロック分割処理にかかる平均時間を更に算出し、このブロック分割処理にかかる平均時間を第1実施形態で述べた他の平均時間の合計に更に加えることにより、インデックスブロックへの1操作当たりの平均処理時間を算出する。
 例えば、処理時間推定部18は、以下の(式8)を用いて、最終的な平均処理時間(t)を算出する。以下の(式8)では、最後の項が、インデックスブロックへの1操作当たりのブロック分割処理にかかる平均時間に相当する。
 t=h*d+(1-w)*s+w*i+c*j   (式8)
 〔動作例〕
 図4は、第2実施形態における予測装置10の動作例をデータの流れと共に示す図である。予測装置10では、まず、データ取得部11が、第1実施形態で挙げた各情報に加えて、各ブロックの最大エントリ数(k)及び1操作当たりのブロック分割数(j)を更に取得する(S1)。第2実施形態では、データ取得部11は、各ブロックの最大エントリ数(k)を用いて、ブロック当たりの平均エントリ数(m)を算出する(S1-1)。
 第2実施形態では、図2に示される第1実施形態の動作例における処理(S2)において、分割時間算出部21が、エントリ処理時間(a)、レイテンシ(L)及び各ブロックの最大エントリ数(k)を用いて、構成態様データに対応する計算を行う(S2-4)。これにより、子ブロック検索時間(d)、リーフブロック走査時間(s)及びエントリ挿入時間(i)に加えて、分割処理単位時間(c)が更に算出される。
 処理時間推定部18は、第1実施形態で算出される値に、分割処理単位時間(c)と1操作当たりのブロック分割数(j)とを掛け合わせた値を加算することにより、平均処理時間(t)を算出する(S3)。
 〔第2実施形態における作用及び効果〕
 上述のように、第2実施形態における予測装置10では、1回のブロック分割処理にかかる平均時間を示す分割処理単位時間(c)が分割時間算出部21により算出され、この分割処理単位時間(c)と1操作当たりのブロック分割数(j)とが掛け合わされることにより1操作当たりのブロック分割処理にかかる平均時間が算出される。そして、第1実施形態で述べた、リーフブロック特定時間、エントリ特定時間及びエントリ挿入時間の合計に更にそのブロック分割処理にかかる平均時間が合算されることにより、最終的な平均処理時間(t)が算出される。
 このように、第2実施形態では、インデックスブロックへの操作の詳細処理としてのブロック分割処理をも反映させた状態で、インデックスブロックへの1操作当たりの平均処理時間(t)が算出される。従って、第2実施形態によれば、ツリー構造を持つインデックスが付与されたデータベースに対する操作にかかる時間を第1実施形態よりもより高精度で予測することができる。
 更に、第2実施形態では、分割処理単位時間(c)を算出する手法が、ブロック分割処理の内容に影響を与えるインデックスブロックの構成態様に応じて切り替えられる。結果、インデックスブロックに採用されているブロック分割処理手法での処理内容が反映された計算が実行されることにより、分割処理単位時間(c)が算出される。よって、第2実施形態によれば、インデックスブロックの構成態様を考慮することにより、高精度の分割処理単位時間(c)を得ることができる。
 [第3実施形態]
 以下、第3実施形態における予測装置10について、第1実施形態及び第2実施形態と異なる内容を中心に説明する。第3実施形態における予測装置10は、インデックスブロックの物理配置を更に考慮して、データベースに対する操作にかかる時間を予測する。なお、以下の説明では、第1実施形態及び第2実施形態と同じ内容については適宜省略される。
 〔装置構成〕
 図5は、第3実施形態における予測装置10の構成例を概念的に示す図である。第3実施形態における予測装置10は、第2実施形態の構成に加えて、付加時間算出部31を更に有する。付加時間算出部31についても、メモリ2に格納されるプログラムがCPU1により実行されることにより実現される。
 データ取得部11は、第1実施形態で挙げた情報に加えて、第1記憶媒体にインデックスブロックの対象部分が格納されておらず第2記憶媒体から対象部分を転送する必要のある確率を示すキャッシュミス率(1-H)、及び、第2記憶媒体から第1記憶媒体へのブロック当たりのデータ転送時間(u)を更に取得する。また、データ取得部11は、第1実施形態で挙げたレイテンシ(L)として、第1記憶媒体に関する第1レイテンシ(L)及び第2記憶媒体に関する第2レイテンシ(L')を取得する。なお、データ取得部11は、第1記憶媒体にインデックスブロックの対象部分が格納されており第2記憶媒体から対象部分を転送する必要のない確率を示すキャッシュヒット率(H)を取得し、このキャッシュヒット率(H)からキャッシュミス率(1-H)を算出するようにしてもよい。
 ここで、第1記憶媒体とは、第2記憶媒体よりも高速な記憶媒体であり、第2記憶媒体に格納されるインデックスブロックの一部を格納する記憶媒体を意味する。例えば、図11の例によれば、第1記憶媒体がメモリ(DIMM DDR3)であり、第2記憶媒体がディスク(SATA)である。なお、第1記憶媒体はキャッシュ(L2)であってもよいし、第2記憶媒体はフラッシュメモリであってもよい。また、第1記憶媒体は、メインメモリ、主記憶、一次記憶などと呼ばれ、第2記憶媒体は、補助記憶、二次記憶などと呼ばれる。本実施形態は、第1記憶媒体及び第2記憶媒体の具体的実現形態を限定しない。
 付加時間算出部31は、第1記憶媒体に対象のインデックスブロックが格納されておらず、第2記憶媒体から第1記憶媒体にその対象のインデックスブロックを転送し格納するのにかかる時間(以降、キャッシュミス時間と表記する)を算出し、このキャッシュミス時間にキャッシュミス率を掛け合わせることにより、キャッシュミスに関する付加時間を算出する。本実施形態では、キャッシュミス時間は、第2記憶媒体にアクセスするのにかかる第2レイテンシ(L')に、第2記憶媒体から第1記憶媒体に対象のインデックスブロックを転送するのにかかるデータ転送時間(u)を加算することにより算出される。
 検索時間算出部15は、第1実施形態で述べた手法により算出された子ブロック検索時間(d)及びリーフブロック走査時間(s)に、付加時間算出部31により算出された付加時間(u)を加算することにより、第3実施形態における子ブロック検索時間(d')及びリーフブロック走査時間(s')を算出する。例えば、検索時間算出部15は、次の(式9)を用いて、子ブロック検索時間(d')及びリーフブロック走査時間(s')を算出する。
 d'=d+(L'+u)*(1-H)、s'=s+(L'+u)*(1-H)  (式9)
 挿入時間算出部16は、第1実施形態で述べた手法により算出されたエントリ挿入時間(i)に、付加時間算出部31により算出された付加時間(u)を加算することにより、第3実施形態におけるエントリ挿入時間(i')を算出する。例えば、挿入時間算出部16は、次の(式10)を用いて、エントリ挿入時間(i')を算出する。
 i'=i+(L'+u)*(1-H)   (式10)
 分割時間算出部21は、第2実施形態で述べた手法により算出された分割処理単位時間(c)に、付加時間算出部31により算出された付加時間(u)を加算することにより、第3実施形態における分割処理単位時間(c')を算出する。例えば、分割時間算出部21は、次の(式11)を用いて、分割処理単位時間(c)を算出する。
 c'=c+(L'+u)*(1-H)   (式11)
 処理時間推定部18は、このように算出された、子ブロック検索時間(d')、リーフブロック走査時間(s')、エントリ挿入時間(i')、分割処理単位時間(c')を第2実施形態と同様の方法で利用することにより、インデックスブロックへの1操作当たりの平均処理時間(t)を算出する。具体的には、処理時間推定部18は、次の(式12)を用いて、当該平均処理時間(t)を算出する。
 t=h*d'+(1-w)*s'+w*i'+c'*j   (式12)
 図6は、第3実施形態における予測装置10の動作例をデータの流れと共に示す図である。予測装置10では、まず、データ取得部11が、第2実施形態で挙げた各情報に加えて、ブロック当たりのデータ転送時間(u)及びキャッシュミス率(1-H)を取得する。また、第3実施形態では、第1実施形態におけるレイテンシ(L)として、第1レイテンシ(L)と第2レイテンシ(L')とが取得される。
 第3実施形態では、図4に示される第2実施形態の動作例における処理(S2)において、付加時間算出部31が、第2レイテンシ(L')、ブロック当たりのデータ転送時間(u)及びキャッシュミス率(1-H)を用いて、キャッシュミスに関する付加時間を算出する(S2-5)。
 次に、第3実施形態では、検索時間算出部15、挿入時間算出部16及び分割時間算出部21が、子ブロック検索時間(d)、リーフブロック走査時間(s)、エントリ挿入時間(i)及び分割処理単位時間(c)に上記付加時間をそれぞれ加算する(S3)。処理時間推定部18は、この付加時間が加算された子ブロック検索時間(d')、リーフブロック走査時間(s')、エントリ挿入時間(i')及び分割処理単位時間(c')を用いて、平均処理時間(t)を算出する(S4)。
 〔第3実施形態における作用及び効果〕
 このように、第3実施形態では、キャッシュミス時特有の処理時間が付加時間(u)として算出され、この付加時間を含む形で、各種処理にかかる時間(子ブロック検索時間(d')、リーフブロック走査時間(s')、エントリ挿入時間(i')、分割処理単位時間(c'))がそれぞれ算出される。
 よって、第3実施形態によれば、キャッシュヒット時及びキャッシュミス時の各処理の内容を反映させた状態で最終的な平均処理時間(t)を算出することができる。即ち、第3実施形態によれば、インデックスブロックの物理配置をも考慮して、データベースに対する操作にかかる時間を、第1実施形態及び第2実施形態よりもより高精度に予測することができる。
 [第4実施形態]
 以下、第4実施形態における予測装置10について、第1実施形態から第3実施形態と異なる内容を中心に説明する。第4実施形態は、第3実施形態とは異なる構成において、インデックスブロックの物理配置を考慮してデータベースに対する操作にかかる時間を予測する。なお、以下の説明では、第1実施形態から第3実施形態と同じ内容については適宜省略される。
 〔装置構成〕
 図7は、第4実施形態における予測装置10の構成例を概念的に示す図である。第4実施形態における予測装置10は、データ取得部41、個別時間算出部42、付加時間算出部43及び処理時間推定部44等を有する。これら各処理部は、メモリ2に格納されるプログラムがCPU1により実行されることにより実現される。
 データ取得部41は、予測対象のデータベースのインデックスブロックに関し、全操作に対する挿入操作の割合を示すライト比率(w)、平均ブランチブロック高さ(h)、第2記憶媒体に関する第2レイテンシ(L')、第1記憶媒体にインデックスブロックの対象部分が格納されておらず第2記憶媒体から対象部分を転送する必要のある確率を示すキャッシュミス率(1-H)、及び、第2記憶媒体から第1記憶媒体へのブロック当たりのデータ転送時間(u)を取得する。ここで、ライト比率(w)、平均ブランチブロック高さ(h)、第2レイテンシ(L')、キャッシュミス率(1-H)、及びデータ転送時間(u)は、第1実施形態及び第3実施形態におけるものと同意である。
 更に、データ取得部41は、第1記憶媒体に格納されるブランチブロックから子ブロック(他のブランチブロック又はリーフブロック)を特定するのにかかる平均時間を示す1次子ブロック検索時間(d)、第1記憶媒体に格納されるリーフブロック内で対象エントリを特定するのにかかる平均時間を示す1次リーフブロック走査時間(s)、第1記憶媒体に格納されるリーフブロックに対象エントリを挿入するのにかかる平均時間を示す1次エントリ挿入時間(i)を取得する。
 データ取得部41は、入出力I/F3に接続されるユーザインタフェース装置を用いてユーザが入力することにより、上述のような各情報を取得する。この場合、データ取得部41は、各情報を入力する画面を表示装置(図示せず)に表示させ、この画面に入力されたデータを上述の各情報として取得する。また、データ取得部41は、各情報を他の装置から通信を介して取得してもよいし、各情報を格納する可搬型記憶媒体から取得してもよい。また、データ取得部41は、第1実施形態と同様の手法で算出された子ブロック検索時間(d)及びリーフブロック走査時間(s)並びにエントリ挿入時間(i)を1次子ブロック検索時間(d)、1次リーフブロック走査時間(s)及び1次エントリ挿入時間(i)として取得してもよい。
 付加時間算出部43は、第3実施形態と同様の手法により、キャッシュミスに関する付加時間を算出する。
 個別時間算出部42は、1次子ブロック検索時間(d)、1次リーフブロック走査時間(s)及び1次エントリ挿入時間(i)に、付加時間算出部43により算出された付加時間をそれぞれ加算することにより、2次子ブロック検索時間(d')、2次リーフブロック走査時間(s')及び2次エントリ挿入時間(i')を算出する。個別時間算出部42におけるこの計算は、第3実施形態における(式9)及び(式10)と同様である。
 処理時間推定部44は、個別時間算出部42により算出された、2次子ブロック検索時間(d')、2次リーフブロック走査時間(s')及び2次エントリ挿入時間(i')、データ取得部41により取得された各情報を用いて、インデックスブロックへの1操作当たりの平均処理時間(t)を算出する。具体的には、処理時間推定部44は、次の(式13)を用いて、当該平均処理時間(t)を算出する。
 t=h*d'+(1-w)*s'+w*i'   (式13)
 上記(式13)における第1項(h*d')は、インデックスブロックへの1操作当たりの対象リーフブロックを特定するのにかかる平均時間を示す。その第2項((1-w)*s')は、インデックスブロックに対する1操作当たりの特定されたリーフブロック内で対象エントリを検索するのにかかる平均時間を示す。その第3項(w*i')は、インデックスブロックへの1操作当たりの特定されたリーフブロック内で対象エントリを挿入するのにかかる平均時間を示す。
 図8は、第4実施形態における予測装置10の動作例をデータの流れと共に示す図である。予測装置10では、まず、データ取得部41が、第2記憶媒体に関する第2レイテンシ(L')、ブロック当たりのデータ転送時間(u)、キャッシュミス率(1-H)、平均ブランチブロック高さ(h)、ライト比率(w)を取得する(S1)。データ取得部41は、更に、1次子ブロック検索時間(d)、1次リーフブロック走査時間(s)及び1次エントリ挿入時間(i)を取得する(S1)。
 次に、付加時間算出部43が、第3実施形態と同様に、付加時間を算出する(S2)。
 続いて、個別時間算出部42は、データ取得部11により取得された、1次子ブロック検索時間(d)、1次リーフブロック走査時間(s)及び1次エントリ挿入時間(i)に、付加時間をそれぞれ加算することにより、2次子ブロック検索時間(d')、2次リーフブロック走査時間(s')及び2次エントリ挿入時間(i')を算出する(S3)。
 最終的に、処理時間推定部44は、個別時間算出部42により算出された、2次子ブロック検索時間(d')、2次リーフブロック走査時間(s')及び2次エントリ挿入時間(i')と、データ取得部41により取得された平均ブランチブロック高さ(h)及びライト比率(w)とを用いて、平均処理時間(t)を算出する(S4)。
 〔第4実施形態の作用及び効果〕
 このように第4実施形態では、キャッシュミス時特有の処理時間が付加時間(u)として算出され、この付加時間を含む形で、各種処理にかかる時間(2次子ブロック検索時間(d')、2次リーフブロック走査時間(s')、2次エントリ挿入時間(i'))がそれぞれ算出される。また、第4実施形態では、これら各種処理にかかる時間を算出する上で利用される1次子ブロック検索時間(d)、1次リーフブロック走査時間(s)、1次エントリ挿入時間(i)は、第1実施形態の手法の他、様々な手法で取得され得る。
 第4実施形態によれば、キャッシュヒット時及びキャッシュミス時の各処理の内容を反映させた状態で最終的な平均処理時間(t)を算出することができるため、データベースに対する操作にかかる時間を高精度に推定することができる。
 [第5実施形態]
 以下、第5実施形態における予測装置10について、第4実施形態と異なる内容を中心に説明する。第5実施形態は、第4実施形態の構成に加えて、エントリ挿入時におけるブロック分割処理にかかる時間を算出する構成を更に有する。なお、以下の説明では、他の実施形態と同じ内容については適宜省略される。
 〔装置構成〕
 第5実施形態における予測装置10は、第4実施形態と同様の構成を有する(図7参照)。
 データ取得部41は、インデックスブロックへの1操作当たりのブロック分割数(j)、1回のブロック分割処理にかかる平均時間を示す1次分割処理単位時間(c)を更に取得する。これら各情報についても、第4実施形態と同様に、様々な手法により取得される。1次分割処理単位時間(c)は、第2実施形態と同様の手法により算出されてもよい(上記(式6)及び(式7)参照)。
 個別時間算出部42は、第4実施形態での処理に加えて、2次分割処理単位時間(c')を更に算出する。2次分割処理単位時間(c')は、1次分割処理単位時間(c)に付加時間を加算することにより算出される。
 処理時間推定部44は、第4実施形態での処理に加えて、インデックスブロックへの1操作当たりのブロック分割処理にかかる平均時間を更に算出する。この平均時間は、個別時間算出部42により算出された2次分割処理単位時間(c')にインデックスブロックへの1操作当たりのブロック分割数(j)を掛け合わせることにより算出される。処理時間推定部44は、ブロック分割処理にかかる平均時間を他の平均時間の合計に更に加えることにより、インデックスブロックへの1操作当たりの平均処理時間を推定する。具体的には、処理時間推定部44は、上記(式12)を用いて、当該平均処理時間(t)を算出する。
 〔動作例〕
 図9は、第5実施形態における予測装置10の動作例をデータの流れと共に示す図である。第5実施形態では、データ取得部41が、第4実施形態で挙げた情報に加えて、1次分割処理単位時間(c)及び1操作当たりのブロック分割数(j)を更に取得する(S1)。
 付加時間算出部43により付加時間が算出された(S2)後、付加時間算出部43が、第4実施形態での算出処理に加えて、1次分割処理単位時間(c)に付加時間を加算することにより、2次分割処理単位時間(c')を更に算出する(S3)。
 処理時間推定部44は、第4実施形態で用いた情報に加えて、第2次分割処理単位時間(c')及び1操作当たりのブロック分割数(j)を更に用いて、平均処理時間(t)を算出する(S4)。
 〔第5実施形態における作用及び効果〕
 このように、第5実施形態では、付加時間を含む形で、1回のブロック分割処理にかかる平均時間が算出され、この算出結果に応じて、インデックスブロックへの1操作当たりのブロック分割処理にかかる平均時間が算出される。第5実施形態では、第4実施形態における構成に加えてこの算出結果を用いることによりインデックスブロックへの1操作当たりの平均処理時間(t)が算出される。
 従って、第5実施形態によれば、データの物理配置のみならず、ブロック分割処理をも反映させた状態で、最終的な平均処理時間(t)を算出することができるため、データベースに対する操作にかかる時間を高精度に推定することができる。
 [変形例]
 上述の各実施形態では、データ取得部11及び41は、ライト比率(w)を取得しているが、全操作に対する検索比率(r)を取得して、この検索比率(r)を用いてライト比率(w)を算出するようにしてもよい(1-r)。また、ライト比率(w)及び検索比率(r)がそれぞれ取得され、取得された検索比率(r)が上記(式5)、(式8)、(式12)及び(式13)における(1-w)として利用されてもよい。
 また、上述の各実施形態におけるデータ取得部11及び41は、ブロック当たりの平均サイズを示すブロックサイズ(b)、エントリ当たりのサイズを示すエントリサイズ(e)及び記憶媒体からのデータ転送速度を示す帯域(B)を更に取得するようにしてもよい。この場合、データ取得部11及び41は、取得されたブロックサイズ(b)をエントリサイズ(e)で除算することにより、各ブロックの最大エントリ数(k)を算出し、かつ、エントリサイズ(e)を帯域(B)で除算することにより、エントリ処理時間(a)を算出するようにしてもよい。この場合、エントリ処理時間(a)は、1つのエントリデータの転送時間として算出される。これは、エントリ処理において、データの転送にかかる時間がデータの操作にかかる時間よりも大勢を占めることの想定に基づく。
 また、上述の各実施形態におけるデータ取得部11及び41は、インデックスブロックにおける総エントリ数(n)を更に取得し、この総エントリ数(n)とブロック当たりの平均エントリ数(m)とを用いた下記(式14)を計算することにより、平均ブランチブロック高さ(h)を算出するようにしてもよい。
Figure JPOXMLDOC01-appb-M000002
 (式14)
 また、上述の各実施形態におけるデータ取得部11及び41は、インデックスブロックへの1操作当たりのブロック分割数(j)を、インデックスブロックにおける総エントリ数(n)、ブロック当たりの平均エントリ数(m)及びライト比率(w)を用いた下記(式15)により算出するようにしてもよい。
 j={(n-m)/(m-1)}*(w/n)   (式15)
 (式15)は、以下のように導くことができる。対象インデックスブロックにおける全てのブロック分割回数をj'と置くと、この全ブロック分割回数j'は、ブロック内のエントリ数とブランチブロックの高さから、以下の式のように示される。以下の式は、次のような考え方を反映している。即ち、総エントリ数nがmh+1に等しく、全てのブロック数は(1+m+m+・・・+m)であり、全ブロック分割回数j'は、ブロック数よりも1小さい。
Figure JPOXMLDOC01-appb-M000003
Figure JPOXMLDOC01-appb-I000001
 1操作当たりのブロック分割数(j)は、全ブロック分割回数j'を処理数で割れば得られる。処理数は、総エントリ数(n)をライト比率(w)で割った値である。このように、上記(式15)が導かれる。
 なお、上述の実施形態において第2記憶媒体をハードディスクであると想定し、第2レイテンシ(L')は、平均シークタイムと平均回転待ち時間との和に設定してもよい。 
 上記の各実施形態及び各変形例の一部又は全部は、以下の付記のようにも特定され得る。但し、各実施形態及び各変形例が以下の記載に限定されるものではない。
(付記1)ツリー構造のインデックスブロックを含むデータベースのためのデータベース性能予測装置において、
 前記インデックスブロックに関し、少なくとも2つの構成態様のいずれか1つを示す構成態様データ、ブロック当たりの平均エントリ数(m)、エントリ当たりの平均処理時間を示すエントリ処理時間(a)、全操作に対する挿入操作の割合を示すライト比率(w)、該インデックスブロックが格納される記憶媒体に関するレイテンシ(L)、及び、平均ブランチブロック高さ(h)を取得するデータ取得手段と、
 前記少なくとも2つの構成態様に関連する少なくとも2つの検索手法に対応し、かつ、前記レイテンシ(L)、前記エントリ処理時間(a)及び前記ブロック当たりの平均エントリ数(m)を用いた、少なくとも2種の計算手法を持ち、前記データ取得手段により取得された構成態様データに応じて該少なくとも2種の計算手法を切り換えて実行することにより算出される、ブロック内で対象エントリを特定するのにかかる平均時間を、子ブロック検索時間(d)及びリーフブロック走査時間(s)として、取得する検索時間算出手段と、
 前記少なくとも2つの構成態様に関連する少なくとも2つのエントリ挿入手法に対応した少なくとも2種の計算手法であって、前記レイテンシ(L)及び前記エントリ処理時間(a)を用いた計算手法、及び、前記レイテンシ(L)、前記エントリ処理時間(a)及び前記ブロック当たりの平均エントリ数(m)を用いた計算手法を含む該少なくとも2種の計算手法を持ち、前記データ取得手段により取得された構成態様データに応じて該少なくとも2種の計算手法を切り換えて実行することにより、リーフブロックに対象エントリを挿入するのにかかる平均時間を示すエントリ挿入時間(i)を取得する挿入時間算出手段と、
 前記平均ブランチブロック高さ(h)と前記子ブロック検索時間(d)とを掛け合わせることにより、前記インデックスブロックへの1操作当たりの対象リーフブロックを特定するのにかかる平均時間を算出し、前記リーフブロック走査時間(s)と前記ライト比率(w)とを用いて、前記インデックスブロックに対する1操作当たりの特定されたリーフブロック内で対象エントリを検索するのにかかる平均時間を算出し、前記エントリ挿入時間(i)と前記ライト比率(w)とを用いて、前記インデックスブロックへの1操作当たりの特定されたリーフブロック内で対象エントリを挿入するのにかかる平均時間を算出し、該算出された各平均時間の合計を、前記インデックスブロックへの1操作当たりの平均処理時間として推定する処理時間推定手段と、
 を備えるデータベース性能予測装置。
(付記2)前記検索時間算出手段が持つ前記少なくとも2種の計算手法は、
 前記レイテンシ(L)に、前記エントリ処理時間(a)と前記ブロック当たりの平均エントリ数(m)とを掛け合わせた値を加算する手法と、
 前記レイテンシ(L)と前記エントリ処理時間(a)とを足し合わせた値に、前記ブロック当たりの平均エントリ数(m)に関し二分探索を行った際の平均比較回数を掛け合わせる手法と、を含み、
 前記挿入時間算出手段が持つ前記少なくとも2種の計算手法は、
 前記レイテンシ(L)及び前記エントリ処理時間(a)を足し合わせる手法と、
 前記検索時間算出手段により算出される前記ブロック内で対象エントリを特定するのにかかる平均時間に、前記エントリ処理時間(a)と前記ブロック当たりの平均エントリ数(m)とを掛け合わせた値を加算する手法と、
 を含む付記1に記載のデータベース性能予測装置。
(付記3)前記データ取得手段は、各ブロックの最大エントリ数(k)及び前記インデックスブロックへの1操作当たりのブロック分割数(j)を更に取得し、該各ブロックの最大エントリ数(k)にブロック当たりの所定使用率を掛け合わせることにより前記ブロック当たりの平均エントリ数(m)を取得し、
 前記データベース性能予測装置は、
  前記少なくとも2つの構成態様に関連する少なくとも2つのブロック分割手法の各々に対応し、かつ、前記レイテンシ(L)、前記エントリ処理時間(a)及び前記各ブロックの最大エントリ数(k)を用いた、少なくとも2種の計算手法を持ち、前記データ取得手段により取得された構成態様データに応じて該少なくとも2種の計算手法を切り換えて実行することにより、1回のブロック分割処理にかかる平均時間を示す分割処理単位時間(c)を取得する分割時間算出手段、を更に備え、
 前記処理時間推定手段は、前記分割処理単位時間(c)に前記インデックスブロックへの1操作当たりのブロック分割数(j)を掛け合わせることにより、前記インデックスブロックへの1操作当たりのブロック分割処理にかかる平均時間を更に算出し、該平均時間を他の平均時間の合計に更に加えることにより、前記インデックスブロックへの1操作当たりの平均処理時間を推定する、
 付記1又は2に記載のデータベース性能予測装置。
(付記4)前記分割時間算出手段が持つ前記少なくとも2種の計算手法は、
 前記レイテンシ(L)、前記エントリ処理時間(a)及び前記各ブロックの最大エントリ数(k)を用いた下記2つの式の計算を含む、
 付記3に記載のデータベース性能予測装置。
 c=(L+1.5*a)*k
 c=a*k+2*L
(付記5)前記データ取得手段は、第1記憶媒体に関する第1レイテンシ、第2記憶媒体に関する第2レイテンシ、該第1記憶媒体に前記インデックスブロックの対象部分が格納されておらず該第2記憶媒体から該対象部分を転送する必要のある確率を示すキャッシュミス率、及び、該第2記憶媒体から該第1記憶媒体へのブロック当たりのデータ転送時間を更に取得し、
 前記データベース性能予測装置は、
  前記第2レイテンシに、前記第2記憶媒体から前記第1記憶媒体へのブロック当たりのデータ転送時間を加算した値に、前記キャッシュミス率を掛け合わせることにより、キャッシュミスに関する付加時間を算出する付加時間算出手段、
 を更に備え、
 前記検索時間算出手段は、前記子ブロック検索時間(d)及び前記リーフブロック走査時間(s)に、前記付加時間を含め、
 前記挿入時間算出手段は、前記エントリ挿入時間(i)に、前記付加時間を含め、
 前記分割時間算出手段は、前記分割処理単位時間(c)に、前記付加時間を含める、
 付記3又は4に記載のデータベース性能予測装置。
(付記6)ツリー構造のインデックスブロックを含むデータベースのためのデータベース性能予測装置において、
 前記インデックスブロックに関し、全操作に対する挿入操作の割合を示すライト比率(w)及び平均ブランチブロック高さ(h)を取得し、第2記憶媒体に関する第2レイテンシ、第1記憶媒体に前記インデックスブロックの対象部分が格納されておらず該第2記憶媒体から該対象部分を転送する必要のある確率を示すキャッシュミス率、及び、該第2記憶媒体から該第1記憶媒体へのブロック当たりのデータ転送時間を取得する第1データ取得手段と、
 前記第1記憶媒体に格納されるブロックから子ブロックを特定するのにかかる平均時間を示す1次子ブロック検索時間(d)、前記第1記憶媒体に格納されるリーフブロック内で対象エントリを特定するのにかかる平均時間を示す1次リーフブロック走査時間(s)、前記第1記憶媒体に格納されるリーフブロックに対象エントリを挿入するのにかかる平均時間を示す1次エントリ挿入時間(i)を取得する第2データ取得手段と、
 前記第2レイテンシに、前記第2記憶媒体から前記第1記憶媒体へのブロック当たりのデータ転送時間を加算した値に、前記キャッシュミス率を掛け合わせることにより、キャッシュミスに関する付加時間を算出する付加時間算出手段と、
 前記1次子ブロック検索時間(d)、前記1次リーフブロック走査時間(s)及び前記1次エントリ挿入時間(i)に前記付加時間をそれぞれ加算することにより、2次子ブロック検索時間(d')、2次リーフブロック走査時間(s')及び2次エントリ挿入時間(i')を算出する個別時間算出手段と、
 前記2次子ブロック検索時間(d')と前記平均ブランチブロック高さ(h)とを掛け合わせることにより、前記インデックスブロックへの1操作当たりの対象リーフブロックを特定するのにかかる平均時間を算出し、前記2次リーフブロック走査時間(s')と前記ライト比率(w)とを用いて、前記インデックスブロックに対する1操作当たりの特定されたリーフブロック内で対象エントリを検索するのにかかる平均時間を算出し、前記2次エントリ挿入時間(i')と前記ライト比率(w)とを用いて、前記インデックスブロックへの1操作当たりの特定されたリーフブロック内で対象エントリを挿入するのにかかる平均時間を算出し、該算出された各平均時間の合計を、前記インデックスブロックへの1操作当たりの平均処理時間として推定する処理時間推定手段と、
 を備えるデータベース性能予測装置。
(付記7)前記第1データ取得手段は、前記インデックスブロックへの1操作当たりのブロック分割数(j)を更に取得し、
 前記第2データ取得手段は、1回のブロック分割処理にかかる平均時間を示す1次分割処理単位時間(c)を更に取得し、
 前記個別時間算出手段は、前記1次分割処理単位時間(c)に前記付加時間を加算することにより、2次分割処理単位時間(c')を算出し、
 前記処理時間推定手段は、前記2次分割処理単位時間(c')に前記インデックスブロックへの1操作当たりのブロック分割数(j)を掛け合わせることにより、前記インデックスブロックへの1操作当たりのブロック分割処理にかかる平均時間を更に算出し、該平均時間を他の平均時間の合計に更に加えることにより、前記インデックスブロックへの1操作当たりの平均処理時間を推定する、
 付記6に記載のデータベース性能予測装置。
(付記8)前記データ取得手段は、前記インデックスブロックにおける総エントリ数(n)を更に取得し、前記インデックスブロックへの1操作当たりのブロック分割数(j)を該総エントリ数(n)、前記ブロック当たりの平均エントリ数(m)及び前記ライト比率(w)を用いた下記式により取得する分割数算出手段を含む、
 付記3から5及び7のいずれか1つに記載のデータベース性能予測装置。
   j={(n-m)/(m-1)}*(w/n)
(付記9)前記データ取得手段は、ブロック当たりの平均サイズを示すブロックサイズ(b)、エントリ当たりのサイズを示すエントリサイズ(e)及び前記記憶媒体からのデータ転送速度を示す帯域(B)を更に取得し、該ブロックサイズ(b)を該エントリサイズ(e)で除算することにより前記各ブロックの最大エントリ数(k)を取得し、該エントリサイズ(e)を該帯域(B)で除算することにより前記エントリ処理時間(a)を取得する付記3から5、7及び8のいずれか1つに記載のデータベース性能予測装置。
(付記10)前記データ取得手段は、前記インデックスブロックにおける総エントリ数(n)を更に取得し、前記ブロック当たりの平均エントリ数(m)及び該総エントリ数(n)を用いた下記式を計算することにより、前記平均ブランチブロック高さ(h)を取得する付記1から9のいずれか1つに記載のデータベース性能予測装置。
 h=logn/m
(付記11)ツリー構造のインデックスブロックを含むデータベースのためのデータベース性能予測方法において、
 コンピュータが、
 前記インデックスブロックに関し、少なくとも2つの構成態様のいずれか1つを示す構成態様データ、ブロック当たりの平均エントリ数(m)、エントリ当たりの平均処理時間を示すエントリ処理時間(a)、全操作に対する挿入操作の割合を示すライト比率(w)、該インデックスブロックが格納される記憶媒体に関するレイテンシ(L)、及び、平均ブランチブロック高さ(h)を取得し、
 前記少なくとも2つの構成態様に関連する少なくとも2つの検索手法に対応し、かつ、前記レイテンシ(L)、前記エントリ処理時間(a)及び前記ブロック当たりの平均エントリ数(m)を用いた、少なくとも2種の計算手法を、前記構成態様データに応じて切り換えて実行することにより算出される、ブロック内で対象エントリを特定するのにかかる平均時間を、子ブロック検索時間(d)及びリーフブロック走査時間(s)として、取得し、
 前記少なくとも2つの構成態様に関連する少なくとも2つのエントリ挿入手法に対応した少なくとも2種の計算手法であって、前記レイテンシ(L)及び前記エントリ処理時間(a)を用いた計算手法、及び、前記レイテンシ(L)、前記エントリ処理時間(a)及び前記ブロック当たりの平均エントリ数(m)を用いた計算手法を含む該少なくとも2種の計算手法を、前記構成態様データに応じて切り換えて実行することにより、リーフブロックに対象エントリを挿入するのにかかる平均時間を示すエントリ挿入時間(i)を取得し、
 前記平均ブランチブロック高さ(h)と前記子ブロック検索時間(d)とを掛け合わせることにより、前記インデックスブロックへの1操作当たりの対象リーフブロックを特定するのにかかる平均時間を算出し、
 前記リーフブロック走査時間(s)と前記ライト比率(w)とを用いて、前記インデックスブロックに対する1操作当たりの特定されたリーフブロック内で対象エントリを検索するのにかかる平均時間を算出し、
 前記エントリ挿入時間(i)と前記ライト比率(w)とを用いて、前記インデックスブロックへの1操作当たりの特定されたリーフブロック内で対象エントリを挿入するのにかかる平均時間を算出し、
 算出された各平均時間の合計を、前記インデックスブロックへの1操作当たりの平均処理時間として推定する、
 ことを含むデータベース性能予測方法。
(付記12)前記少なくとも2つの検索手法に対応する前記少なくとも2種の計算手法は、
 前記レイテンシ(L)に、前記エントリ処理時間(a)と前記ブロック当たりの平均エントリ数(m)とを掛け合わせた値を加算する手法と、
 前記レイテンシ(L)と前記エントリ処理時間(a)とを足し合わせた値に、前記ブロック当たりの平均エントリ数(m)に関し二分探索を行った際の平均比較回数を掛け合わせる手法と、を含み、
 前記少なくとも2つのエントリ挿入手法に対応する前記少なくとも2種の計算手法は、
 前記レイテンシ(L)及び前記エントリ処理時間(a)を足し合わせる手法と、
 前記検索時間算出手段により算出される前記ブロック内で対象エントリを特定するのにかかる平均時間に、前記エントリ処理時間(a)と前記ブロック当たりの平均エントリ数(m)とを掛け合わせた値を加算する手法と、
 を含む付記11に記載のデータベース性能予測方法。
(付記13)前記コンピュータが、
 各ブロックの最大エントリ数(k)及び前記インデックスブロックへの1操作当たりのブロック分割数(j)を更に取得し、該各ブロックの最大エントリ数(k)にブロック当たりの所定使用率を掛け合わせることにより前記ブロック当たりの平均エントリ数(m)を取得し、
 前記少なくとも2つの構成態様に関連する少なくとも2つのブロック分割手法の各々に対応し、かつ、前記レイテンシ(L)、前記エントリ処理時間(a)及び前記各ブロックの最大エントリ数(k)を用いた、少なくとも2種の計算手法を、前記データ取得手段により取得された構成態様データに応じて切り換えて実行することにより、1回のブロック分割処理にかかる平均時間を示す分割処理単位時間(c)を取得し、
 前記分割処理単位時間(c)に前記インデックスブロックへの1操作当たりのブロック分割数(j)を掛け合わせることにより、前記インデックスブロックへの1操作当たりのブロック分割処理にかかる平均時間を算出する、
 ことを更に含み、
 前記1操作当たりの平均処理時間の推定は、前記インデックスブロックへの1操作当たりのブロック分割処理にかかる平均時間を他の平均時間の合計に更に加えることにより、前記インデックスブロックへの1操作当たりの平均処理時間を推定する、
 付記11又は12に記載のデータベース性能予測方法。
(付記14)前記少なくとも2つのブロック分割手法に対応する前記少なくとも2種の計算手法は、
 前記レイテンシ(L)、前記エントリ処理時間(a)及び前記各ブロックの最大エントリ数(k)を用いた下記2つの式の計算を含む、
 付記13に記載のデータベース性能予測方法。
 c=(L+1.5*a)*k
 c=a*k+2*L
(付記15)前記コンピュータが、
 第1記憶媒体に関する第1レイテンシ、第2記憶媒体に関する第2レイテンシ、該第1記憶媒体に前記インデックスブロックの対象部分が格納されておらず該第2記憶媒体から該対象部分を転送する必要のある確率を示すキャッシュミス率、及び、該第2記憶媒体から該第1記憶媒体へのブロック当たりのデータ転送時間を取得し、
 前記第2レイテンシに、前記第2記憶媒体から前記第1記憶媒体へのブロック当たりのデータ転送時間を加算した値に、前記キャッシュミス率を掛け合わせることにより、キャッシュミスに関する付加時間を算出し、
 前記子ブロック検索時間(d)、前記リーフブロック走査時間(s)、前記エントリ挿入時間(i)及び前記分割処理単位時間(c)に、前記付加時間をそれぞれ含める、
 ことを更に含む付記13又は14に記載のデータベース性能予測方法。
(付記16)ツリー構造のインデックスブロックを含むデータベースのためのデータベース性能予測方法において、
 コンピュータが、
 前記インデックスブロックに関し、全操作に対する挿入操作の割合を示すライト比率(w)及び平均ブランチブロック高さ(h)を取得し、
 第2記憶媒体に関する第2レイテンシ、第1記憶媒体に前記インデックスブロックの対象部分が格納されておらず該第2記憶媒体から該対象部分を転送する必要のある確率を示すキャッシュミス率、及び、該第2記憶媒体から該第1記憶媒体へのブロック当たりのデータ転送時間を取得し、
 前記第1記憶媒体に格納されるブロックから子ブロックを特定するのにかかる平均時間を示す1次子ブロック検索時間(d)、前記第1記憶媒体に格納されるリーフブロック内で対象エントリを特定するのにかかる平均時間を示す1次リーフブロック走査時間(s)、前記第1記憶媒体に格納されるリーフブロックに対象エントリを挿入するのにかかる平均時間を示す1次エントリ挿入時間(i)を取得し、
 前記第2レイテンシに、前記第2記憶媒体から前記第1記憶媒体へのブロック当たりのデータ転送時間を加算した値に、前記キャッシュミス率を掛け合わせることにより、キャッシュミスに関する付加時間を算出し、
 前記1次子ブロック検索時間(d)、前記1次リーフブロック走査時間(s)及び前記1次エントリ挿入時間(i)に前記付加時間をそれぞれ加算することにより、2次子ブロック検索時間(d')、2次リーフブロック走査時間(s')及び2次エントリ挿入時間(i')を算出し、
 前記2次子ブロック検索時間(d')と前記平均ブランチブロック高さ(h)とを掛け合わせることにより、前記インデックスブロックへの1操作当たりの対象リーフブロックを特定するのにかかる平均時間を算出し、
 前記2次リーフブロック走査時間(s')と前記ライト比率(w)とを用いて、前記インデックスブロックに対する1操作当たりの特定されたリーフブロック内で対象エントリを検索するのにかかる平均時間を算出し、
 前記2次エントリ挿入時間(i')と前記ライト比率(w)とを用いて、前記インデックスブロックへの1操作当たりの特定されたリーフブロック内で対象エントリを挿入するのにかかる平均時間を算出し、
 前記算出された各平均時間の合計を、前記インデックスブロックへの1操作当たりの平均処理時間として推定する、
 ことを含むデータベース性能予測方法。
(付記17)前記コンピュータが、
 前記インデックスブロックへの1操作当たりのブロック分割数(j)を取得し、
 1回のブロック分割処理にかかる平均時間を示す1次分割処理単位時間(c)を取得し、
 前記1次分割処理単位時間(c)に前記付加時間を加算することにより、2次分割処理単位時間(c')を算出し、
 前記2次分割処理単位時間(c')に前記インデックスブロックへの1操作当たりのブロック分割数(j)を掛け合わせることにより、前記インデックスブロックへの1操作当たりのブロック分割処理にかかる平均時間を算出する、
 ことを更に含み、
 前記1操作当たりの平均処理時間の推定は、前記インデックスブロックへの1操作当たりのブロック分割処理にかかる平均時間を他の平均時間の合計に更に加えることにより、前記インデックスブロックへの1操作当たりの平均処理時間を推定する、
 付記16に記載のデータベース性能予測方法。
(付記18)前記コンピュータが、
 前記インデックスブロックにおける総エントリ数(n)を取得し、
 前記インデックスブロックへの1操作当たりのブロック分割数(j)を該総エントリ数(n)、前記ブロック当たりの平均エントリ数(m)及び前記ライト比率(w)を用いた下記式により取得する、
 ことを更に含む付記13から15及び17のいずれか1つに記載のデータベース性能予測方法。
   j={(n-m)/(m-1)}*(w/n)
(付記19)前記コンピュータが、
 ブロック当たりの平均サイズを示すブロックサイズ(b)、エントリ当たりのサイズを示すエントリサイズ(e)及び前記記憶媒体からのデータ転送速度を示す帯域(B)を取得し、
 前記ブロックサイズ(b)を前記エントリサイズ(e)で除算することにより前記各ブロックの最大エントリ数(k)を算出し、
 前記エントリサイズ(e)を前記帯域(B)で除算することにより前記エントリ処理時間(a)を算出する、
 ことを更に含む付記13から15、17及び18のいずれか1つに記載のデータベース性能予測方法。
(付記20)前記コンピュータが、
 前記インデックスブロックにおける総エントリ数(n)を取得し、
 前記ブロック当たりの平均エントリ数(m)及び前記総エントリ数(n)を用いた下記式を計算することにより、前記平均ブランチブロック高さ(h)を算出する、
 ことを更に含む付記11から19のいずれか1つに記載のデータベース性能予測方法。
 h=logn/m
 この出願は、2011年6月8日に出願された日本出願特願2011-127930号を基礎とする優先権を主張し、その開示の全てをここに取り込む。

Claims (10)

  1.  ツリー構造のインデックスブロックを含むデータベースのためのデータベース性能予測装置において、
     前記インデックスブロックに関し、少なくとも2つの構成態様のいずれか1つを示す構成態様データ、ブロック当たりの平均エントリ数(m)、エントリ当たりの平均処理時間を示すエントリ処理時間(a)、全操作に対する挿入操作の割合を示すライト比率(w)、該インデックスブロックが格納される記憶媒体に関するレイテンシ(L)、及び、平均ブランチブロック高さ(h)を取得するデータ取得手段と、
     前記少なくとも2つの構成態様に関連する少なくとも2つの検索手法に対応し、かつ、前記レイテンシ(L)、前記エントリ処理時間(a)及び前記ブロック当たりの平均エントリ数(m)を用いた、少なくとも2種の計算手法を持ち、前記データ取得手段により取得された構成態様データに応じて該少なくとも2種の計算手法を切り換えて実行することにより算出される、ブロック内で対象エントリを特定するのにかかる平均時間を、子ブロック検索時間(d)及びリーフブロック走査時間(s)として、取得する検索時間算出手段と、
     前記少なくとも2つの構成態様に関連する少なくとも2つのエントリ挿入手法に対応した少なくとも2種の計算手法であって、前記レイテンシ(L)及び前記エントリ処理時間(a)を用いた計算手法、及び、前記レイテンシ(L)、前記エントリ処理時間(a)及び前記ブロック当たりの平均エントリ数(m)を用いた計算手法を含む該少なくとも2種の計算手法を持ち、前記データ取得手段により取得された構成態様データに応じて該少なくとも2種の計算手法を切り換えて実行することにより、リーフブロックに対象エントリを挿入するのにかかる平均時間を示すエントリ挿入時間(i)を取得する挿入時間算出手段と、
     前記平均ブランチブロック高さ(h)と前記子ブロック検索時間(d)とを掛け合わせることにより、前記インデックスブロックへの1操作当たりの対象リーフブロックを特定するのにかかる平均時間を算出し、前記リーフブロック走査時間(s)と前記ライト比率(w)とを用いて、前記インデックスブロックに対する1操作当たりの特定されたリーフブロック内で対象エントリを検索するのにかかる平均時間を算出し、前記エントリ挿入時間(i)と前記ライト比率(w)とを用いて、前記インデックスブロックへの1操作当たりの特定されたリーフブロック内で対象エントリを挿入するのにかかる平均時間を算出し、該算出された各平均時間の合計を、前記インデックスブロックへの1操作当たりの平均処理時間として推定する処理時間推定手段と、
     を備えるデータベース性能予測装置。
  2.  前記検索時間算出手段が持つ前記少なくとも2種の計算手法は、
     前記レイテンシ(L)に、前記エントリ処理時間(a)と前記ブロック当たりの平均エントリ数(m)とを掛け合わせた値を加算する手法と、
     前記レイテンシ(L)と前記エントリ処理時間(a)とを足し合わせた値に、前記ブロック当たりの平均エントリ数(m)に関し二分探索を行った際の平均比較回数を掛け合わせる手法と、を含み、
     前記挿入時間算出手段が持つ前記少なくとも2種の計算手法は、
     前記レイテンシ(L)及び前記エントリ処理時間(a)を足し合わせる手法と、
     前記検索時間算出手段により算出される前記ブロック内で対象エントリを特定するのにかかる平均時間に、前記エントリ処理時間(a)と前記ブロック当たりの平均エントリ数(m)とを掛け合わせた値を加算する手法と、
     を含む請求項1に記載のデータベース性能予測装置。
  3.  前記データ取得手段は、各ブロックの最大エントリ数(k)及び前記インデックスブロックへの1操作当たりのブロック分割数(j)を更に取得し、該各ブロックの最大エントリ数(k)にブロック当たりの所定使用率を掛け合わせることにより前記ブロック当たりの平均エントリ数(m)を取得し、
     前記データベース性能予測装置は、
      前記少なくとも2つの構成態様に関連する少なくとも2つのブロック分割手法の各々に対応し、かつ、前記レイテンシ(L)、前記エントリ処理時間(a)及び前記各ブロックの最大エントリ数(k)を用いた、少なくとも2種の計算手法を持ち、前記データ取得手段により取得された構成態様データに応じて該少なくとも2種の計算手法を切り換えて実行することにより、1回のブロック分割処理にかかる平均時間を示す分割処理単位時間(c)を取得する分割時間算出手段、を更に備え、
     前記処理時間推定手段は、前記分割処理単位時間(c)に前記インデックスブロックへの1操作当たりのブロック分割数(j)を掛け合わせることにより、前記インデックスブロックへの1操作当たりのブロック分割処理にかかる平均時間を更に算出し、該平均時間を他の平均時間の合計に更に加えることにより、前記インデックスブロックへの1操作当たりの平均処理時間を推定する、
     請求項1又は2に記載のデータベース性能予測装置。
  4.  前記分割時間算出手段が持つ前記少なくとも2種の計算手法は、
     前記レイテンシ(L)、前記エントリ処理時間(a)及び前記各ブロックの最大エントリ数(k)を用いた下記2つの式の計算を含む、
     請求項3に記載のデータベース性能予測装置。
     c=(L+1.5*a)*k
     c=a*k+2*L
  5.  前記データ取得手段は、第1記憶媒体に関する第1レイテンシ、第2記憶媒体に関する第2レイテンシ、該第1記憶媒体に前記インデックスブロックの対象部分が格納されておらず該第2記憶媒体から該対象部分を転送する必要のある確率を示すキャッシュミス率、及び、該第2記憶媒体から該第1記憶媒体へのブロック当たりのデータ転送時間を更に取得し、
     前記データベース性能予測装置は、
      前記第2レイテンシに、前記第2記憶媒体から前記第1記憶媒体へのブロック当たりのデータ転送時間を加算した値に、前記キャッシュミス率を掛け合わせることにより、キャッシュミスに関する付加時間を算出する付加時間算出手段、
     を更に備え、
     前記検索時間算出手段は、前記子ブロック検索時間(d)及び前記リーフブロック走査時間(s)に、前記付加時間を含め、
     前記挿入時間算出手段は、前記エントリ挿入時間(i)に、前記付加時間を含め、
     前記分割時間算出手段は、前記分割処理単位時間(c)に、前記付加時間を含める、
     請求項3又は4に記載のデータベース性能予測装置。
  6.  ツリー構造のインデックスブロックを含むデータベースのためのデータベース性能予測装置において、
     前記インデックスブロックに関し、全操作に対する挿入操作の割合を示すライト比率(w)及び平均ブランチブロック高さ(h)を取得し、第2記憶媒体に関する第2レイテンシ、第1記憶媒体に前記インデックスブロックの対象部分が格納されておらず該第2記憶媒体から該対象部分を転送する必要のある確率を示すキャッシュミス率、及び、該第2記憶媒体から該第1記憶媒体へのブロック当たりのデータ転送時間を取得する第1データ取得手段と、
     前記第1記憶媒体に格納されるブロックから子ブロックを特定するのにかかる平均時間を示す1次子ブロック検索時間(d)、前記第1記憶媒体に格納されるリーフブロック内で対象エントリを特定するのにかかる平均時間を示す1次リーフブロック走査時間(s)、前記第1記憶媒体に格納されるリーフブロックに対象エントリを挿入するのにかかる平均時間を示す1次エントリ挿入時間(i)を取得する第2データ取得手段と、
     前記第2レイテンシに、前記第2記憶媒体から前記第1記憶媒体へのブロック当たりのデータ転送時間を加算した値に、前記キャッシュミス率を掛け合わせることにより、キャッシュミスに関する付加時間を算出する付加時間算出手段と、
     前記1次子ブロック検索時間(d)、前記1次リーフブロック走査時間(s)及び前記1次エントリ挿入時間(i)に前記付加時間をそれぞれ加算することにより、2次子ブロック検索時間(d')、2次リーフブロック走査時間(s')及び2次エントリ挿入時間(i')を算出する個別時間算出手段と、
     前記2次子ブロック検索時間(d')と前記平均ブランチブロック高さ(h)とを掛け合わせることにより、前記インデックスブロックへの1操作当たりの対象リーフブロックを特定するのにかかる平均時間を算出し、前記2次リーフブロック走査時間(s')と前記ライト比率(w)とを用いて、前記インデックスブロックに対する1操作当たりの特定されたリーフブロック内で対象エントリを検索するのにかかる平均時間を算出し、前記2次エントリ挿入時間(i')と前記ライト比率(w)とを用いて、前記インデックスブロックへの1操作当たりの特定されたリーフブロック内で対象エントリを挿入するのにかかる平均時間を算出し、該算出された各平均時間の合計を、前記インデックスブロックへの1操作当たりの平均処理時間として推定する処理時間推定手段と、
     を備えるデータベース性能予測装置。
  7.  前記第1データ取得手段は、前記インデックスブロックへの1操作当たりのブロック分割数(j)を更に取得し、
     前記第2データ取得手段は、1回のブロック分割処理にかかる平均時間を示す1次分割処理単位時間(c)を更に取得し、
     前記個別時間算出手段は、前記1次分割処理単位時間(c)に前記付加時間を加算することにより、2次分割処理単位時間(c')を算出し、
     前記処理時間推定手段は、前記2次分割処理単位時間(c')に前記インデックスブロックへの1操作当たりのブロック分割数(j)を掛け合わせることにより、前記インデックスブロックへの1操作当たりのブロック分割処理にかかる平均時間を更に算出し、該平均時間を他の平均時間の合計に更に加えることにより、前記インデックスブロックへの1操作当たりの平均処理時間を推定する、
     請求項6に記載のデータベース性能予測装置。
  8.  前記データ取得手段は、前記インデックスブロックにおける総エントリ数(n)を更に取得し、前記インデックスブロックへの1操作当たりのブロック分割数(j)を該総エントリ数(n)、前記ブロック当たりの平均エントリ数(m)及び前記ライト比率(w)を用いた下記式により取得する分割数算出手段を含む、
     請求項3から5及び7のいずれか1項に記載のデータベース性能予測装置。
       j={(n-m)/(m-1)}*(w/n)
  9.  ツリー構造のインデックスブロックを含むデータベースのためのデータベース性能予測方法において、
     コンピュータが、
     前記インデックスブロックに関し、少なくとも2つの構成態様のいずれか1つを示す構成態様データ、ブロック当たりの平均エントリ数(m)、エントリ当たりの平均処理時間を示すエントリ処理時間(a)、全操作に対する挿入操作の割合を示すライト比率(w)、該インデックスブロックが格納される記憶媒体に関するレイテンシ(L)、及び、平均ブランチブロック高さ(h)を取得し、
     前記少なくとも2つの構成態様に関連する少なくとも2つの検索手法に対応し、かつ、前記レイテンシ(L)、前記エントリ処理時間(a)及び前記ブロック当たりの平均エントリ数(m)を用いた、少なくとも2種の計算手法を、前記構成態様データに応じて切り換えて実行することにより算出される、ブロック内で対象エントリを特定するのにかかる平均時間を、子ブロック検索時間(d)及びリーフブロック走査時間(s)として、取得し、
     前記少なくとも2つの構成態様に関連する少なくとも2つのエントリ挿入手法に対応した少なくとも2種の計算手法であって、前記レイテンシ(L)及び前記エントリ処理時間(a)を用いた計算手法、及び、前記レイテンシ(L)、前記エントリ処理時間(a)及び前記ブロック当たりの平均エントリ数(m)を用いた計算手法を含む該少なくとも2種の計算手法を、前記構成態様データに応じて切り換えて実行することにより、リーフブロックに対象エントリを挿入するのにかかる平均時間を示すエントリ挿入時間(i)を取得し、
     前記平均ブランチブロック高さ(h)と前記子ブロック検索時間(d)とを掛け合わせることにより、前記インデックスブロックへの1操作当たりの対象リーフブロックを特定するのにかかる平均時間を算出し、
     前記リーフブロック走査時間(s)と前記ライト比率(w)とを用いて、前記インデックスブロックに対する1操作当たりの特定されたリーフブロック内で対象エントリを検索するのにかかる平均時間を算出し、
     前記エントリ挿入時間(i)と前記ライト比率(w)とを用いて、前記インデックスブロックへの1操作当たりの特定されたリーフブロック内で対象エントリを挿入するのにかかる平均時間を算出し、
     算出された各平均時間の合計を、前記インデックスブロックへの1操作当たりの平均処理時間として推定する、
     ことを含むデータベース性能予測方法。
  10.  ツリー構造のインデックスブロックを含むデータベースのためのデータベース性能予測方法において、
     コンピュータが、
     前記インデックスブロックに関し、全操作に対する挿入操作の割合を示すライト比率(w)及び平均ブランチブロック高さ(h)を取得し、
     第2記憶媒体に関する第2レイテンシ、第1記憶媒体に前記インデックスブロックの対象部分が格納されておらず該第2記憶媒体から該対象部分を転送する必要のある確率を示すキャッシュミス率、及び、該第2記憶媒体から該第1記憶媒体へのブロック当たりのデータ転送時間を取得し、
     前記第1記憶媒体に格納されるブロックから子ブロックを特定するのにかかる平均時間を示す1次子ブロック検索時間(d)、前記第1記憶媒体に格納されるリーフブロック内で対象エントリを特定するのにかかる平均時間を示す1次リーフブロック走査時間(s)、前記第1記憶媒体に格納されるリーフブロックに対象エントリを挿入するのにかかる平均時間を示す1次エントリ挿入時間(i)を取得し、
     前記第2レイテンシに、前記第2記憶媒体から前記第1記憶媒体へのブロック当たりのデータ転送時間を加算した値に、前記キャッシュミス率を掛け合わせることにより、キャッシュミスに関する付加時間を算出し、
     前記1次子ブロック検索時間(d)、前記1次リーフブロック走査時間(s)及び前記1次エントリ挿入時間(i)に前記付加時間をそれぞれ加算することにより、2次子ブロック検索時間(d')、2次リーフブロック走査時間(s')及び2次エントリ挿入時間(i')を算出し、
     前記2次子ブロック検索時間(d')と前記平均ブランチブロック高さ(h)とを掛け合わせることにより、前記インデックスブロックへの1操作当たりの対象リーフブロックを特定するのにかかる平均時間を算出し、
     前記2次リーフブロック走査時間(s')と前記ライト比率(w)とを用いて、前記インデックスブロックに対する1操作当たりの特定されたリーフブロック内で対象エントリを検索するのにかかる平均時間を算出し、
     前記2次エントリ挿入時間(i')と前記ライト比率(w)とを用いて、前記インデックスブロックへの1操作当たりの特定されたリーフブロック内で対象エントリを挿入するのにかかる平均時間を算出し、
     前記算出された各平均時間の合計を、前記インデックスブロックへの1操作当たりの平均処理時間として推定する、
     ことを含むデータベース性能予測方法。
PCT/JP2012/002489 2011-06-08 2012-04-10 データベース性能予測装置及びデータベース予測方法 WO2012169102A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2013519351A JP6020448B2 (ja) 2011-06-08 2012-04-10 データベース性能予測装置及びデータベース予測方法
US14/124,209 US9336254B2 (en) 2011-06-08 2012-04-10 Database performance estimation device and database estimation method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2011127930 2011-06-08
JP2011-127930 2011-06-08

Publications (1)

Publication Number Publication Date
WO2012169102A1 true WO2012169102A1 (ja) 2012-12-13

Family

ID=47295695

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/002489 WO2012169102A1 (ja) 2011-06-08 2012-04-10 データベース性能予測装置及びデータベース予測方法

Country Status (3)

Country Link
US (1) US9336254B2 (ja)
JP (1) JP6020448B2 (ja)
WO (1) WO2012169102A1 (ja)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9247312B2 (en) 2011-01-05 2016-01-26 Sonic Ip, Inc. Systems and methods for encoding source media in matroska container files for adaptive bitrate streaming using hypertext transfer protocol
US9467708B2 (en) 2011-08-30 2016-10-11 Sonic Ip, Inc. Selection of resolutions for seamless resolution switching of multimedia content
US9313510B2 (en) 2012-12-31 2016-04-12 Sonic Ip, Inc. Use of objective quality measures of streamed content to reduce streaming bandwidth
US9191457B2 (en) * 2012-12-31 2015-11-17 Sonic Ip, Inc. Systems, methods, and media for controlling delivery of content
US9866878B2 (en) 2014-04-05 2018-01-09 Sonic Ip, Inc. Systems and methods for encoding and playing back video at different frame rates using enhancement layers
US20170192688A1 (en) * 2015-12-30 2017-07-06 International Business Machines Corporation Lazy deletion of vaults in packed slice storage (pss) and zone slice storage (zss)
US10664473B2 (en) * 2017-01-30 2020-05-26 International Business Machines Corporation Database optimization based on forecasting hardware statistics using data mining techniques
US10963483B2 (en) * 2017-04-26 2021-03-30 Oracle International Corporation Sequential storage volume replication based on comparison of write session identifiers
US10983909B2 (en) * 2019-01-18 2021-04-20 Vmware, Inc. Trading off cache space and write amplification for Bε-trees
US11669570B2 (en) * 2019-10-31 2023-06-06 EMC IP Holding Company LLC Amortized execution of updates to a hardened hash table

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63220323A (ja) * 1987-03-10 1988-09-13 Fujitsu Ltd エンドユ−ザ言語内部処理論理出力処理方式
JPH032938A (ja) * 1989-05-31 1991-01-09 Hitachi Ltd データベース処理方法
JPH0830639A (ja) * 1994-07-15 1996-02-02 Mitsubishi Electric Corp データ転送方法並びにデータ転送量見積り方法
US5758146A (en) * 1994-05-20 1998-05-26 International Business Machines Corporation Method and apparatus for optimizing data retrieval using index scanning
JP2008225575A (ja) * 2007-03-08 2008-09-25 Nec Corp 計算機負荷見積システム、計算機負荷見積方法

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5043872A (en) 1988-07-15 1991-08-27 International Business Machines Corporation Access path optimization using degrees of clustering
US5875445A (en) * 1997-05-29 1999-02-23 Oracle Corporation Performance-related estimation using pseudo-ranked trees
US20060265489A1 (en) * 2005-02-01 2006-11-23 Moore James F Disaster management using an enhanced syndication platform
US20080005086A1 (en) * 2006-05-17 2008-01-03 Moore James F Certificate-based search
US8954967B2 (en) * 2011-05-31 2015-02-10 International Business Machines Corporation Adaptive parallel data processing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63220323A (ja) * 1987-03-10 1988-09-13 Fujitsu Ltd エンドユ−ザ言語内部処理論理出力処理方式
JPH032938A (ja) * 1989-05-31 1991-01-09 Hitachi Ltd データベース処理方法
US5758146A (en) * 1994-05-20 1998-05-26 International Business Machines Corporation Method and apparatus for optimizing data retrieval using index scanning
JPH0830639A (ja) * 1994-07-15 1996-02-02 Mitsubishi Electric Corp データ転送方法並びにデータ転送量見積り方法
JP2008225575A (ja) * 2007-03-08 2008-09-25 Nec Corp 計算機負荷見積システム、計算機負荷見積方法

Also Published As

Publication number Publication date
JP6020448B2 (ja) 2016-11-02
US20140114951A1 (en) 2014-04-24
US9336254B2 (en) 2016-05-10
JPWO2012169102A1 (ja) 2015-02-23

Similar Documents

Publication Publication Date Title
JP6020448B2 (ja) データベース性能予測装置及びデータベース予測方法
US9996564B2 (en) Managing database object placement on multiple storage devices
US10983994B2 (en) Partition access method for query optimization
CN107851123B (zh) 在存储器中虚拟列单元内具体化表达式以加速分析查询
US9858303B2 (en) In-memory latch-free index structure
US9805077B2 (en) Method and system for optimizing data access in a database using multi-class objects
US20160283140A1 (en) File system block-level tiering and co-allocation
US8566308B2 (en) Intelligent adaptive index density in a database management system
Canim et al. An object placement advisor for DB2 using solid state storage
JP2017518584A (ja) フラッシュ最適化データ・レイアウトのための方法、フラッシュ最適化記憶のための装置、およびコンピュータ・プログラム
CN110362566B (zh) 分层htap数据库的混合数据布局中的数据布置
Li et al. Mining block correlations to improve storage performance
Jin et al. Read/write-optimized tree indexing for solid-state drives
Herodotou AutoCache: Employing machine learning to automate caching in distributed file systems
Mukherjee Synthesis of non-replicated dynamic fragment allocation algorithm in distributed database systems
Wu et al. A data management method for databases using hybrid storage systems
JPWO2012081165A1 (ja) データベース管理装置及びデータベース管理方法
Menon et al. Logstore: A workload-aware, adaptable key-value store on hybrid storage systems
Esteves et al. Palpatine: mining frequent sequences for data prefetching in NoSQL distributed key-value stores
JP2013080403A (ja) テーブルパーティション分割装置及び方法及びプログラム
Li et al. Optimizing nonindexed join processing in flash storage-based systems
Cheng et al. Take Out the {TraChe}: Maximizing (Tra) nsactional Ca (che) Hit Rate
Vanderkooy Sampling-based Predictive Database Buffer Management
Luo et al. MoonKV: Optimizing Update-intensive Workloads for NVM-based Key-value Stores
Kakaraparthy Towards Resource-Efficient Data Analytics

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

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2013519351

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 14124209

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

Country of ref document: EP

Kind code of ref document: A1