IP Library Granted Patent US 12,430,334
Granted Patent B2
US 12,430,334 · App. 18/369,923 · Granted Sep 30, 2025

Database management apparatus and method

Inventors: Norifumi Nishikawa (Tokyo, JP); Shinji Fujiwara (Tokyo, JP); Mayuko Ozawa (Tokyo, JP); Kazuhiko Mogi (Tokyo, JP); Kazuo Goda (Tokyo, JP); Yuto Hayamizu (Tokyo, JP)
Assignees: HITACHI, LTD.; THE UNIVERSITY OF TOKYO
G06F16/24544
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,430,334
App. No.
18/369,923
Granted
Sep 30, 2025
Kind
B2
Abstract

The scanning range of an inner table can be limited in the join processing irrespective of the existence of search conditions or a partition key, and the performance of the join processing can be improved. There is a column range index representing a range of values stored in a table. When a join result of a current stage is an outer table related to a join of a next stage in a join of each stage of the join processing, a database management apparatus identifies whether there is a possibility that an inner table related to a join of a next stage includes a hit record in an inner table related to a join of a current stage based on a column range index corresponding to a join column of a current stage and a column range index corresponding to a join column of a next stage.

Claims (76)

1. A database management apparatus, comprising:

a processor which when executing a program configures the processor to:

receive a query of a database stored in a storage apparatus;

execute query processing as processing in response to the query; and

create a filter as data representing a scanning range of an inner table, wherein

the storage apparatus stores a column range index as data representing a range of values stored in a table in the database,

the query processing is processing in which join processing including a join of multiple stages is performed,

when a join result of a current stage is an outer table related to a join of a next stage in a join of each stage of the join processing,

the processor performs filter creation processing,

the processor scans only a range represented with the filter created in the filter creation processing within an inner table related to the join of the next stage,

the filter creation processing identifies whether there is a possibility that an inner table related to a join of a next stage includes a hit record in an inner table related to a join of a current stage based on a column range index corresponding to a join column of a current stage and a column range index corresponding to a join column of a next stage,

the table in the database is configured from a plurality of segments,

each of the plurality of segments is a unit that is larger than a record, is configured from two or more records within the table, and includes a plurality of columns of the table,

the column range index exists for each segment,

each column range index is data representing a range of values stored in a column of a segment corresponding to the column range index, and

the filter creation processing additionally includes:

identifying a segment having a range that at least partially overlaps with a range of a segment including a hit record in an inner table related to a join of a current stage based on a column range index corresponding to a join column of a current stage and a column range index corresponding to a join column of a next stage; and

adding data representing the identified segment to the filter.

2. The database management apparatus according to claim 1 , wherein:

when there is a possibility that an inner table related to a join of a next stage includes a hit record in an inner table related to a join of a current stage, the filter creation processing additionally determines to implement scanning of an inner table related to a join of a next stage.

3. The database management apparatus according to claim 1 , wherein:

the processor is further configured to perform the filter creation processing when a segment includes a first hit record.

4. The database management apparatus according to claim 1 , wherein the processor is further configured to:

when the query processing includes the join processing including the join of the multiple stages, perform creation determination where the query processing determines whether an overlap of ranges between segments in each column is small, or whether an application using the values stored in the database is a prescribed application; and

perform the filter creation processing when a result of the creation determination is true.

5. The database management apparatus according to claim 1 , wherein:

the table in the database is configured from a plurality of chunks;

each chunk is configured from two or more of the plurality of segments; and

the processor is further configured to select a scan unit to be a segment, a chunk or an overall inner table according to a number of the identified segments, and update the filter or does not create the filter according to the selected scan unit.

6. The database management apparatus according to claim 5 , wherein:

the scan unit is a segment when a number of the identified segments satisfies a condition that a number of segments is small;

the scan unit is a chunk when a number of the identified segments satisfies a condition that a number of segments is medium; and

the scan unit is an overall inner table when a number of the identified segments satisfies a condition that a number of segments is large.

7. The database management apparatus according to claim 1 , wherein:

the join processing is recursive join processing; and

the filter creation processing includes:

identifying a range of a segment including a hit record in an inner table related to a join of a current stage from a column range index corresponding to a join column of a next stage;

identifying a segment having a range that at least partially overlaps with the identified range from a column range index corresponding to a join column of a current stage; and

adding data representing the identified segment to the filter.

8. The database management apparatus according to claim 1 , wherein:

the join processing is multistage join processing; and

the filter creation processing includes:

identifying a range of a segment including a hit record in an inner table related to a join of a current stage from a column range index corresponding to a join column of a current stage;

identifying a segment having a range that at least partially overlaps with the identified range from a column range index corresponding to a join column of a next stage; and

adding data representing the identified segment to the filter.

9. The database management apparatus according to claim 1 , wherein the processor is further configured to:

when the query processing includes the join processing including the join of the multiple stages, perform creation determination of determining whether an application using the values stored in the database is a prescribed application; and

perform the filter creation processing when a result of the creation determination is true.

10. A database management method, comprising the steps of:

when query processing as processing in response to a query of a database stored in a storage apparatus is processing in which join processing including a join of multiple stages and a join result of a current stage is an outer table related to a join of a next stage in a join of each stage of the join processing,

performing filter creation processing; and

scanning only a range represented with the filter created in the filter creation processing within an inner table related to the join of the next stage, wherein

the storage apparatus stores a column range index as data representing a range of values stored in a table in the database,

the filter is data representing a scanning range of an inner table,

the filter creation processing identifies whether there is a possibility that an inner table related to a join of a next stage includes a hit record in an inner table related to a join of a current stage based on a column range index corresponding to a join column of a current stage and a column range index corresponding to a join column of a next stage,

the table in the database is configured from a plurality of segments,

each of the plurality of segments is a unit that is larger than a record, is configured from two or more records within the table, and includes a plurality of columns of the table,

the column range index exists for each segment,

each column range index is data representing a range of values stored in a column of a segment corresponding to the column range index, and

the filter creation processing additionally includes:

identifying a segment having a range that at least partially overlaps with a range of a segment including a hit record in an inner table related to a join of a current stage based on a column range index corresponding to a join column of a current stage and a column range index corresponding to a join column of a next stage; and

adding data representing the identified segment to the filter.

11. A non-transitory computer-readable medium storing a computer program for causing a computer to:

when query processing as processing in response to a query of a database stored in a storage apparatus is processing in which join processing including a join of multiple stages and a join result of a current stage is an outer table related to a join of a next stage in a join of each stage of the join processing,

perform filter creation processing; and

scan only a range represented with the filter created in the filter creation processing within an inner table related to the join of the next stage, wherein

the storage apparatus stores a column range index as data representing a range of values stored in a table in the database,

the filter is data representing a scanning range of an inner table,

the filter creation processing identifies whether there is a possibility that an inner table related to a join of a next stage includes a hit record in an inner table related to a join of a current stage based on a column range index corresponding to a join column of a current stage and a column range index corresponding to a join column of a next stage,

the table in the database is configured from a plurality of segments,

each of the plurality of segments is a unit that is larger than a record, is configured from two or more records within the table, and includes a plurality of columns of the table,

the column range index exists for each segment,

each column range index is data representing a range of values stored in a column of a segment corresponding to the column range index, and

the filter creation processing additionally includes:

identifying a segment having a range that at least partially overlaps with a range of a segment including a hit record in an inner table related to a join of a current stage based on a column range index corresponding to a join column of a current stage and a column range index corresponding to a join column of a next stage; and

adding data representing the identified segment to the filter.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 19, 2023
From: NISHIKAWA, NORIFUMI; FUJIWARA, SHINJI; OZAWA, MAYUKO; MOGI, KAZUHIKO; GODA, KAZUO; HAYAMIZU, YUTO
To: HITACHI, LTD.; THE UNIVERSITY OF TOKYO
Reel/Frame 064947/0879 →
Priority Claims (1)
JP 2023-034882 · Mar 7, 2023 · national
Continuity (1)
Related Publication 20240303239A1 · Sep 12, 2024
References Cited (13)
US 5241648A · Cheng · 1993 [cited by examiner]
US 5742806A · Reiner · 1998 [cited by examiner]
US 6185557B1 · Liu · 2001 [cited by examiner]
US 10810201B2 · Beavin et al. · 2020 [cited by applicant]
US 20120317094A1 · Bear · 2012 [cited by examiner]
US 20150261818A1 · Attaluri · 2015 [cited by examiner]
US 20150339350A1 · Baggett · 2015 [cited by examiner]
US 20160098451A1 · Dickie · 2016 [cited by examiner]
US 20160335321A1 · Yoshida · 2016 [cited by examiner]
US 20240078237A1 · Ma · 2024 [cited by examiner]
Srikanth Kandula, et al., “Pushing Data Induced Predicates Through Joins in Big-Data Clusters”, Proceedings of the VLDB Endowment, vol. 13, No. 3, 2004, ISSN 21508097. https://doi.org/10.14778/3368289.3368292. [cited by applicant]
Shinsuke Sugie, “Bloom Filter algorithm for SQL execution”, Future Technology Blog, Oct. 31, 2016., https://future-architect.github.io/articles/20161031/. [cited by applicant]
Ali Afroozeh, et al., “Faster SQL Queries on Delta Lake with Dynamic File Pruning”, Engineering Blog, Apr. 30, 2020., https://www.databricks.com/blog./2020/04/30/faster-sql-queries-on-delta-lake-with-dynamic-file-prunin… [cited by applicant]