Re: Query with NULL

From: Mladen Gogala <>
Date: Sun, 3 Jan 2010 20:06:12 +0000 (UTC)
Message-ID: <hhqtbk$v2d$>

On Thu, 31 Dec 2009 08:30:45 -0800, Mark D Powell wrote:

> Since the OP has now informed us the SQL is part of a package and cannot
> be changed I think the OP's options are limited. Stored outlines might
> be of use but I think it is unlikely since one possible condition in the
> SQL as posted requires a full table scan that I do not think there is
> any way around without changing the SQL.

In 10G there is DBMS_ADVANCED_REWRITE package which can be used to rewrite the bad SQL even if there is no access to the source. The procedure in the package is "DECLARE_REWRITE_EUIVALENCE". A brief example is available here:

Somewhat more detailed article is here:

Received on Sun Jan 03 2010 - 14:06:12 CST

Original text of this message