Re: UNION ALL and SELECT DISTINCT

From: -CELKO- <jcelko212_at_earthlink.net>
Date: 5 Apr 2006 17:59:18 -0700
Message-ID: <1144285158.213904.121570_at_i39g2000cwa.googlegroups.com>


>>The nice folks who gave us the SQL language adopted two different conventions regarding duplicates in result tables. <<

Well, someone did not do their homework!! The ALL keyword preserves duplcates and DISTINCT removes redundantrdups in many places in SQL. But it is the assumption/option and not the requirement.in places in the language.

>> I'd also like it if the optimizer could figure out when SELECT ALL and SELECT DISTINCT are equivalent, and make use of that in picking the optimal strategy. <<

Most products do ..

>> I'd prefer it to pick a strategy that's correct but not optimal, and not pick a fast but incorrect strategy. <<

I do not see a conflict. Correct first, fast next. Received on Thu Apr 06 2006 - 02:59:18 CEST

Original text of this message