Materialized Query Table Matching With Query Expansion
Abstract
Methods, apparatuses, and computer program products for materialized query table matching are provided that include receiving a database query, retrieving a materialized query table (MQT) from data storage accessible to a database management system, selecting a join in the materialized query table between a table that is not invoked by the query and a table that is invoked in the query, determining whether the selected join is lossless, and expanding the query to include the lossless join if the selected join is lossless, expanding the query to include the lossless join. Determining whether the selected join is lossless may be carried out by losslessly joining the table that is not invoked by the query to the query, and determining whether the lossless join to the query matches the selected join of the materialized query table.
Claims
exact text as granted — not AI-modified1 - 6 . (canceled)
7 . An apparatus for materialized query table matching, the apparatus comprising:
a computer processor; a computer memory coupled for data transfer to the processor, the computer memory having disposed within it computer program instructions comprising: a database management system; the database management system capable of:
receiving a database query;
retrieving a materialized query table from data storage accessible to a database management system;
selecting a join in the materialized query table between a table that is not invoked by the query and a table that is invoked in the query;
determining whether the selected join is lossless including:
losslessly joining the table that is not invoked by the query to the query including:
identifying a primary key in the table not invoked by the query;
identifying a foreign key in the table that is invoked by the query;
identifying the same foreign key in the query;
losslessly joining the primary key of the table not invoked by the query to the same foreign key in the query including:
creating a copy of the query;
losslessly joining the primary key to the same foreign key of the copy of the query;
determining whether the lossless join to the query matches the selected join of the materialized query table; and
if the selected join is lossless, expanding the query to include the lossless join.
8 . (canceled)
9 . (canceled)
10 . (canceled)
11 . (canceled)
12 . The apparatus of claim 7 wherein the database management system is further capable of determining whether all the joins in the materialized query table have been selected; and
selecting another materialized query table if all the joins in the materialized query table have been selected.
13 . A computer program product for materialized query table matching, the computer program product disposed upon a recordable medium, the computer program product comprising:
computer program instructions that receive a database query; computer program instructions that retrieve a materialized query table from data storage accessible to a database management system; computer program instructions that select a join in the materialized query table between a table that is not invoked by the query and a table that is invoked in the query; computer program instructions that determine whether the selected join is lossless including:
computer program instructions that losslessly join the table that is not invoked by the query to the query including:
computer program instructions that identify a primary key in the table not invoked by the query;
computer program instructions that identify a foreign key in the table that is invoked by the query;
computer program instructions that identify the same foreign key in the query;
computer program instructions that losslessly join the primary key of the table not invoked by the query to the same foreign key in the query including:
computer program instructions that create a copy of the query;
computer program instructions that losslessly join the primary key to the same foreign key of the copy of the query;
computer program instructions that determine whether the lossless join to the query matches the selected join of the materialized query table; and
computer program instructions that expand the query to include the lossless join if the selected join is lossless.
14 . (canceled)
15 . (canceled)
16 . (canceled)
17 . (canceled)
18 . (canceled)
19 . (canceled)
20 . The method of claim 13 further comprising computer program instructions that determine whether all the joins in the materialized query table have been selected; and
computer program instructions that select another materialized query table if all the joins in the materialized query table have been selected.Join the waitlist — get patent alerts
Track US2008215578A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.