Using object awareness for a join pruning mechanism
AssigneeHasso-Plattner-Institut Fur Softwaresystemtechnik GmbH
InventorsHasso Plattner, Stephan Mueller, Jens Krueger, Juergen Mueller, Anisoara Nica
Life of this patent
Estimating the term…
Abstract
The invention relates to a computer system and a corresponding method and a corresponding computer-readable medium. The computer system is suitable for determining the result of a join. Based on the access pattern of an application, the computer system infers that a particular subjoin is empty. The computer system then excludes the inferred-empty subjoin when performing the join, performing a more efficient and faster database join operation.
Claims18
A computer system for determining a result of a join, the computer system comprising:
- a processing unit;
- a database coupled to the processing unit,
- the database comprising:
- a first table, and
- a second table,
- each of the first table and the second table being partitioned into at least two partitions, including a first partition of the first table, a second partition of the first table, a first partition of the second table, and a second partition of the second table,
- the database being coupled to an application that, in operation, accesses the database according to an access pattern;
- and
- a database engine executable by the processor and communicatively coupled to the database, the database engine being configured for determining a join between the first table and the second table by:
- inferring from the access pattern of the application that at least one of a plurality of subjoins is empty, wherein the plurality of subjoins includes a first subjoin between the first partition of the first table and the first partition of the second table, a second subjoin between the first partition of the first table and the second partition of the second table, a third subjoin between the second partition of the first table and the first partition of the second table, and a fourth subjoin between the second partition of the first table and the second partition of the second table;
- determining a plurality of results for the plurality of subjoins excluding the at least one of the plurality of subjoins that was inferred to be empty;
- and
- combining the plurality of results that exclude the at least one of the plurality of subjoins that was inferred to be empty.
A method for determining a result of a join, the method comprising the following steps:
- providing
- a processing unit;
- a database coupled to the processing unit,
- the database comprising:
- a first table, and
- a second table,
- each of the first table and the second table being partitioned into at least two partitions, including a first partition of the first table, a second partition of the first table, a first partition of the second table, and a second partition of the second table,
- the database being coupled to an application that, in operation, accesses the database according to an access pattern,
- a database engine executable by the processor and communicatively coupled to the database,
- the database engine determining a join between the first table and the second table by:
- inferring from the access pattern of the application that at least one of a plurality of subjoins is empty, wherein the plurality of subjoins includes a first subjoin between the first partition of the first table and the first partition of the second table, a second subjoin between the first partition of the first table and the second partition of the second table, a third subjoin between the second partition of the first table and the first partition of the second table, and a fourth subjoin between the second partition of the first table and the second partition of the second table;
- determining a plurality of results for the plurality of subjoins excluding the at least one of the plurality of subjoins that was inferred to be empty;
- and
- combining the plurality of results that exclude the at least one of the plurality of subjoins that was inferred to be empty.
A non-transitory machine-readable medium storing a computer program that when executed by a computer system implements a method for determining a result of a join, wherein the computer system includes a processor and a memory, the method comprising:
- providing
- a processing unit;
- a database coupled to the processing unit,
- the database comprising:
- a first table, and
- a second table,
- each of the first table and the second table being partitioned into at least two partitions, including a first partition of the first table, a second partition of the first table, a first partition of the second table, and a second partition of the second table,
- the database being coupled to an application that, in operation, accesses the database according to an access pattern,
- a database engine executable by the processor and communicatively coupled to the database,
- the database engine determining a join between the first table and the second table by:
- inferring from the access pattern of the application that at least one of a plurality of subjoins is empty, wherein the plurality of subjoins includes a first subjoin between the first partition of the first table and the first partition of the second table, a second subjoin between the first partition of the first table and the second partition of the second table, a third subjoin between the second partition of the first table and the first partition of the second table, and a fourth subjoin between the second partition of the first table and the second partition of the second table;
- determining a plurality of results for the plurality of subjoins excluding the at least one of the plurality of subjoins that was inferred to be empty;
- and
- combining the plurality of results that exclude the at least one of the plurality of subjoins that was inferred to be empty.
Dependencies are inferred from the claim text.