|
ABSTRACT
Correlated queries are very common and important in decision support systems. Traditional nested iteration evaluation methods for such queries can be very time consuming. When they apply, query rewriting techniques have been shown to be much more efficient. But query rewriting is not always possible. When query rewriting does not apply, can we do something better than the traditional nested iteration methods? In this paper, we propose a new invariant technique to evaluate correlated queries efficiently. The basic idea is to recognize the part of the subquery that is not related to the outer references and cache the result of that part after its first execution. Later, we can reuse the result and combine it with the result of the rest of the subquery that is changing for each iteration. Our technique applies to arbitrary correlated subqueries.
This paper introduces algorithms to recognize the invariant part of a data flow tree, and to restructure the evaluation plan to reuse the stored intermediate result. We also propose an efficient method to teach an existing join optimizer to understand the invariant feature and thus allow it to be able to generate better join plans in the new context. Some other related optimization techniques are also discussed. The proposed techniques were implemented within three months on an existing real commercial database system.
We also experimentally evaluate our proposed technique. Our evaluation indicates that, when query rewriting is not possible, the invariant technique is significantly better than the traditional nested iteration method. Even when query rewriting applies, the invariant technique is sometimes better than the query rewriting technique. Our conclusion is that the invariant technique should be considered as one of the alternatives in evaluating correlated queries since it fills the gap left by rewriting techniques.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
Bel96
|
Randy Bello. Invariant subplans in dataflow. Sybase IQ Internal Engineering Document~ 1996.
|
| |
CD85
|
Hong-Tai Chou and David J. Dewitt. An evaluation of buffer management strategies for relational database systems. In Proceedings of the 11th VLDB Conference, pages 127-141, 1985.
|
| |
Cha97
|
|
| |
CR97
|
|
| |
Day87
|
|
| |
Gra94
|
|
 |
GW87
|
|
 |
Hel94
|
|
 |
HHW97
|
Joseph M. Hellerstein , Peter J. Haas , Helen J. Wang, Online aggregation, Proceedings of the 1997 ACM SIGMOD international conference on Management of data, p.171-182, May 11-15, 1997, Tucson, Arizona, United States
|
 |
HN96
|
|
 |
JM96
|
Roberto J. Bayardo, Jr. , Daniel P. Miranker, Processing queries for first-few answers, Proceedings of the fifth international conference on Information and knowledge management, p.45-52, November 12-16, 1996, Rockville, Maryland, United States
[doi> 10.1145/238355.238372]
|
 |
Kim82
|
|
| |
Lea96
|
Dan Leary. Dataflow operators feature specification. Sybase IQ Internal Engineering Document, 1996.
|
| |
Mic68
|
Donald Michie. "memo" functions and machine learning. Nature, 218:19-22, 1968.
|
| |
OL90
|
|
 |
OQ97
|
|
| |
Pau97
|
Glenn Paulley, 1997. personal communication.
|
 |
PHH92
|
Hamid Pirahesh , Joseph M. Hellerstein , Waqar Hasan, Extensible/rule based query rewrite optimization in Starburst, Proceedings of the 1992 ACM SIGMOD international conference on Management of data, p.39-48, June 02-05, 1992, San Diego, California, United States
|
 |
SAC+79
|
P. Griffiths Selinger , M. M. Astrahan , D. D. Chamberlin , R. A. Lorie , T. G. Price, Access path selection in a relational database management system, Proceedings of the 1979 ACM SIGMOD international conference on Management of data, May 30-June 01, 1979, Boston, Massachusetts
[doi> 10.1145/582095.582099]
|
 |
Sel88
|
|
| |
SG90
|
|
| |
SPL96
|
|
 |
SSM96
|
David Simmen , Eugene Shekita , Timothy Malkemus, Fundamental techniques for order optimization, Proceedings of the 1996 ACM SIGMOD international conference on Management of data, p.57-67, June 04-06, 1996, Montreal, Quebec, Canada
|
| |
Syb97a
|
Sybase Corporation. Adaptive Server Enterprise 11.5, 1997.
|
| |
Syb97b
|
Sybase Corporation. Sybase IQ 11.2.1, 1997.
|
| |
TPC95
|
Tpc-d benchmark standard specification (revision 1.0). May 1995.
|
| |
YL95
|
|
CITED BY 8
|
|
|
|
|
Calisto Zuzarte , Hamid Pirahesh , Wenbin Ma , Qi Cheng , Linqi Liu , Kwai Wong, WinMagic: subquery elimination using window aggregation, Proceedings of the 2003 ACM SIGMOD international conference on Management of data, June 09-12, 2003, San Diego, California
|
|
|
|
|
|
|
|
|
P. Bohannon , S. Ganguly , H. F. Korth , P. P. S. Narayan , P. Shenoy, Optimizing view queries in ROLEX to support navigable result trees, Proceedings of the 28th international conference on Very Large Data Bases, p.119-130, August 20-23, 2002, Hong Kong, China
|
|
|
|
|
|
|
|
|
|
|