Re: Query with NULL

From: Mladen Gogala <gogala.mladen_at_gmail.com>
Date: Sun, 3 Jan 2010 20:06:12 +0000 (UTC)
Message-ID: <hhqtbk$v2d$34_at_solani.org>



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:

http://www.blogskies.com/2009/07/dbmsadvancedrewrite.html

Somewhat more detailed article is here:

http://www.oracle-base.com/articles/10g/dbms_advanced_rewrite.php

-- 
http://mgogala.freehostia.com
Received on Sun Jan 03 2010 - 14:06:12 CST

Original text of this message