Translating SQL Into Relational Algebra: Optimization, Semantics, and Equivalence of SQL Queries
IEEE Transactions on Software Engineering
Query optimization by semantic reasoning
Query optimization by semantic reasoning
Optimization of nested SQL queries revisited
SIGMOD '87 Proceedings of the 1987 ACM SIGMOD international conference on Management of data
Principles of database and knowledge-base systems, Vol. I
Principles of database and knowledge-base systems, Vol. I
An introduction to database systems: vol. 1 (5th ed.)
An introduction to database systems: vol. 1 (5th ed.)
Relational database writings (1985–1989)
Relational database writings (1985–1989)
Formal semantics of SQL queries
ACM Transactions on Database Systems (TODS)
Extensible/rule based query rewrite optimization in Starburst
SIGMOD '92 Proceedings of the 1992 ACM SIGMOD international conference on Management of data
On optimizing an SQL-like nested query
ACM Transactions on Database Systems (TODS)
Decomposition—a strategy for query processing
ACM Transactions on Database Systems (TODS)
Calculating constraints on relational expression
ACM Transactions on Database Systems (TODS)
VLDB '87 Proceedings of the 13th International Conference on Very Large Data Bases
Translating and Optimizing SQL Queries Having Aggregates
VLDB '87 Proceedings of the 13th International Conference on Very Large Data Bases
Deriving Production Rules for Incremental View Maintenance
VLDB '91 Proceedings of the 17th International Conference on Very Large Data Bases
Improved Unnesting Algorithms for Join Aggregate SQL Queries
VLDB '92 Proceedings of the 18th International Conference on Very Large Data Bases
Theory of Relational Databases
Theory of Relational Databases
On semantic reefs and efficient processing of correlation queries with aggregates
VLDB '85 Proceedings of the 11th international conference on Very Large Data Bases - Volume 11
Knowledge-based query processing
VLDB '80 Proceedings of the sixth international conference on Very Large Data Bases - Volume 6
Hi-index | 0.00 |
Consider an SQL query that specifies duplicate elimination via a DISTINCT clause. Because duplicate elimination often requires an expensive sort of the query result, it is often worthwhile to identify situations where the DISTINCT clause is unnecessary, to avoid the sort altogether. We prove a necessary and sufficient condition for deciding if a query requires duplicate elimination. The condition exploits knowledge about keys, table constraints, and query predicates. Because the condition cannot always be tested efficiently, we offer a practical algorithm that tests a simpler, sufficient condition. We consider applications of this condition for various types of queries, and show that we can exploit this condition in both relational and nonrelational database systems.