Invention Grant
- Patent Title: Cost-based query rewrite using materialized views
- Patent Title (中): 使用物化视图进行基于成本的查询重写
-
Application No.: US12183571Application Date: 2008-07-31
-
Publication No.: US07991765B2Publication Date: 2011-08-02
- Inventor: Hong Gui , Grace Au , Kuorong Chiang
- Applicant: Hong Gui , Grace Au , Kuorong Chiang
- Applicant Address: US OH Dayton
- Assignee: Teradata US, Inc.
- Current Assignee: Teradata US, Inc.
- Current Assignee Address: US OH Dayton
- Agency: Schwegman, Lundberg & Woessner
- Main IPC: G06F7/00
- IPC: G06F7/00

Abstract:
A system and method of rewriting a database query where the query contains an aggregate includes the following. If one or more aggregate materialized views are considered, rewriting the query using an aggregate materialized view. If one or more non-aggregate multi-table materialized views are considered, the query is rewritten using a multi-table materialized view. A join cost is determined for each such non-aggregate multi-table materialized view. If one or more non-aggregate single table materialized views are considered, the query is rewritten using the single table materialized view. A join cost is determined for each such non-aggregate single table materialized view. Finally, a current total cost is determined for use of various materialized views as a function of join cost, aggregation cost and spool cost to select a rewritten query.
Public/Granted literature
- US20100030731A1 COST-BASED QUERY REWRITE USING MATERIALIZED VIEWS Public/Granted day:2010-02-04
Information query