Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: UNION ALL and SELECT DISTINCT

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@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 Wed Apr 05 2006 - 19:59:18 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US