| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: UNION ALL and SELECT DISTINCT
>>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
![]() |
![]() |