Re: query rewrite

  • From: Marcin Przepiorowski <pioro1@xxxxxxxxx>
  • To: Ghassan Salem <salem.ghassan@xxxxxxxxx>
  • Date: Wed, 30 Dec 2009 09:41:20 +0000

On Wed, Dec 30, 2009 at 8:53 AM, Ghassan Salem <salem.ghassan@xxxxxxxxx> wrote:
> Well, semantically, it cannot be pushed, as Kyle noted, if in the first
> case, the select returns more than one row, it gives an error, in the second
> case, it gives more than one row, so, semantically, the queries are not
> equivalent, and CBO cannot rewrite them. In all cases, I don't think it even
> tries to do so.
>

You are right but I have seen a lot of "workarounds" for a bad written
subqueries with
min or max taken from ID or name just to achieve a single row return.

regards,
Marcin Przepiorowski
--
//www.freelists.org/webpage/oracle-l


Other related posts: