IP Library › Granted Patent US 12,271,380
Granted Patent B2
US 12,271,380 · App. 18/354,110 · Granted Apr 8, 2025

Index join query optimization

Inventors: Manuel Mayr (Walldorf, DE); Wolfgang Stephan (Heidelberg, DE); Till Merker (Sandhausen, DE)
Assignee: SAP SE
G06F16/24544G06F16/2456
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,271,380
App. No.
18/354,110
Granted
Apr 8, 2025
Kind
B2
Abstract

In some implementations, there is provided a method including receiving a query request including a join, wherein the join includes a range between a first predicate of the join and a second predicate of the join; generating a query plan including an index join operator; executing the query plan including the index join operator including getting, from the sorted dictionary, the first value identifier, the second value identifier, and the one or more intervening value identifiers between the first value identifier and the second value identifier and executing the index join operator using the first value identifier, the second value identifier, and the one or more intervening value identifiers to obtain a result set.

Claims (34)

1. A system, comprising:

at least one data processor; and

at least one memory storing instructions which, when executed by the at least one data processor, cause operations comprising:

receiving a query request including a join of a first column with a second column, wherein the join includes a range between a first predicate of the join in the first column and a second predicate of the join in the first column;

generating a query plan including an index join operator, wherein the index join operator includes a join handler configured to get, from a sorted dictionary at query plan execution, a first value identifier corresponding to the first predicate in the first column, a second value identifier corresponding to the second predicate in the first column, and, for one or more values in the first column between the first predicate and the second predicate, one or more intervening value identifiers between the first value identifier and the second value identifier;

executing the query plan including the index join operator, wherein the executing further comprises getting, from the sorted dictionary, the first value identifier, the second value identifier, and the one or more intervening value identifiers between the first value identifier and the second value identifier, and executing the index join operator using the first value identifier, the second value identifier, and the one or more intervening value identifiers to obtain a result set; and

responding to the query request by providing the result set.

2. The system of claim 1 , wherein the query request is received at a database execution engine.

3. The system of claim 1 , wherein the join may select from a first table and a second table one or more values based on the range between the first predicate of the join and the second predicate of the join.

4. The system of claim 1 , wherein the query plan is generated, by a database execution engine, in response to the query request that is received.

5. The system of claim 1 , wherein the join handler is configured to include one or more instructions to perform the get from the sorted dictionary.

6. The system of claim 1 , wherein the query plan includes a plurality of operators including the index join operator.

7. The system of claim 6 , wherein the plurality of operators are configured are executed, by a database execution engine, using at least one pipeline.

8. The system of claim 1 , wherein the executing of the query plan including the index join operator is performed by at least a database execution engine.

9. The system of claim 1 , wherein the index join operator includes the join handler, wherein the join handler gets from the sorted dictionary the first value identifier, the second value identifier, and the one or more intervening value identifiers.

10. The system of claim 1 , wherein the index join operator includes the join handler, wherein the join handler executes the index join operator using the first value identifier, the second value identifier, and the one or more intervening value identifiers.

11. A method comprising:

receiving a query request including a join of a first column with a second column, wherein the join includes a range between a first predicate of the join in the first column and a second predicate of the join in the first column;

generating a query plan including an index join operator, wherein the index join operator includes a join handler configured to get, from a sorted dictionary at query plan execution, a first value identifier corresponding to the first predicate in the first column, a second value identifier corresponding to the second predicate in the first column, and, for one or more values in the first column between the first predicate and the second predicate, one or more intervening value identifiers between the first value identifier and the second value identifier;

executing the query plan including the index join operator, wherein the executing further comprises getting, from the sorted dictionary, the first value identifier, the second value identifier, and the one or more intervening value identifiers between the first value identifier and the second value identifier, and executing the index join operator using the first value identifier, the second value identifier, and the one or more intervening value identifiers to obtain a result set; and

responding to the query request by providing the result set.

12. The method of claim 11 , wherein the query request is received at a database execution engine.

13. The method of claim 11 , wherein the join may select from a first table and a second table one or more values based on the range between the first predicate of the join and the second predicate of the join.

14. The method of claim 11 , wherein the query plan is generated, by a database execution engine, in response to the query request that is received.

15. The method of claim 11 , wherein the join handler is configured to include one or more instructions to perform the get from the sorted dictionary.

16. The method of claim 11 , wherein the query plan includes a plurality of operators including the index join operator.

17. The method of claim 16 , wherein the plurality of operators are configured are executed, by a database execution engine, using at least one pipeline.

18. The method of claim 11 , wherein the executing of the query plan including the index join operator is performed by at least a database execution engine.

19. The method of claim 11 , wherein the index join operator includes the join handler, wherein the join handler gets from the sorted dictionary the first value identifier, the second value identifier, and the one or more intervening value identifiers.

20. A non-transitory computer-readable medium including instructions which, when executed by at least one data processor, cause operations comprising:

receiving a query request including a join of a first column with a second column, wherein the join includes a range between a first predicate of the join in the first column and a second predicate of the join in the first column;

generating a query plan including an index join operator, wherein the index join operator includes a join handler configured to get, from a sorted dictionary at query plan execution, a first value identifier corresponding to the first predicate in the first column, a second value identifier corresponding to the second predicate in the first column, and, for one or more values in the first column between the first predicate and the second predicate, one or more intervening value identifiers between the first value identifier and the second value identifier;

executing the query plan including the index join operator, wherein the executing further comprises getting, from the sorted dictionary, the first value identifier, the second value identifier, and the one or more intervening value identifiers between the first value identifier and the second value identifier, and executing the index join operator using the first value identifier, the second value identifier, and the one or more intervening value identifiers to obtain a result set; and

responding to the query request by providing the result set.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 18, 2023
From: MAYR, MANUEL; STEPHAN, WOLFGANG; MERKER, TILL
To: SAP SE
Reel/Frame 064298/0230 →
Continuity (1)
Related Publication 20250028721A1 · Jan 23, 2025
References Cited (12)
US 20140067789A1 · Ahmed · 2014 [cited by examiner]
US 20140172908A1 · Konik · 2014 [cited by examiner]
US 20210157779A1 · Fender · 2021 [cited by examiner]
US 20240004882A1 · Bove · 2024 [cited by examiner]
Deshmukh, H. “To pipeline, or not to pipeline, that is the question.” arXiv preprint arXiv:2002.00866 (2020). [cited by applicant]
“Join Conditions for Tables, Queries, and Views,” (Available at https://msdn. microsoft.com/en-us/library/f4saeycb (v=vs.80).aspx), 8 pages. [cited by applicant]
SAP “SAP HANA Performance Guide for Developers,” SAP HANA Platform 2.0 SPS 04; Document Version 1.1—Oct. 31, 2019, (Available at https://help.sap.com/doc/05b8cb60dfd94c82b86828ee77f7e0d9/2.8.04/en-US/SAP_HANA_Performanc… [cited by applicant]
SAP “SAP HANA SQL and System Views Reference,” Sap Hana Platform 2.0, SPS 00; Document Version: 1.0, 30. Nov. 2016, (Available at http://www.taubeta.ru/content/SAP_HANA_SQL.pdf), 1732 pages. [cited by applicant]
“SQL Join on Table A value within Table B range,” (Available at https://web.archive.org/web/20160104231844/https://stackoverflow.com/questions/12604146/sql-join-on-table-a-value-within-table-b-range), 3 pages. [cited by applicant]
Stonebraker, M et al. “C-Store: A col. Oriented DBMS.” Proceedings of 31st VLDB, Trondheim, Normway, Jan. 1, 2005. [cited by applicant]
Wesley, R et al., “Leveraging compression in the tableau data engine.” Proceedings of the 2014 ACM SIGMOD international conference on Management of data. 2014. [cited by applicant]
Extended European Search Report issued in European Application No. 24184517.1-1203 mailed Nov. 21, 2024, 12 pages. [cited by applicant]