Invention Grant
- Patent Title: Eliminating inner joins based on a temporal relationship constraint
- Patent Title (中): 基于时间关系约束消除内部联接
-
Application No.: US12955063Application Date: 2010-11-29
-
Publication No.: US08407180B1Publication Date: 2013-03-26
- Inventor: Bhashyam Ramesh , Stephen A. Brobst
- Applicant: Bhashyam Ramesh , Stephen A. Brobst
- Applicant Address: US OH Dayton
- Assignee: Teradata US, Inc.
- Current Assignee: Teradata US, Inc.
- Current Assignee Address: US OH Dayton
- Agent Howard Speight
- Main IPC: G06F17/30
- IPC: G06F17/30 ; G06F17/00

Abstract:
A query is received. It is determined that the query includes an inner join between a parent table and a child table. It is determined that the following relationships exist between the parent table and the child table: referential integrity (“RI”) between a primary key attribute (pk) in the parent table and a foreign key attribute (fk) in the child table, where “attribute” is defined to mean one or more columns, and a temporal relationship constraint (“TRC”) between a period attribute in the parent table and a TRC-attribute in the child table, the TRC-attribute being a date or time attribute. It is determined that the query does not access any attribute in the parent table other than the pk. It is determined that the query specifies an equality predicate of the form pk=fk. It is determined that the query selects a snapshot from the parent using a predicate of the form parent.[period attribute] contains a point in time (t1). It is determined that the query selects from the child those rows whose TRC-attribute is equal to or prior to t1. The inner join is eliminated when planning execution of the query. The query is executed to produce a result. The result is saved.
Information query