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

Home -> Community -> Usenet -> c.d.o.server -> Re: Help on HINTS

Re: Help on HINTS

From: Sybrand Bakker <oradba_at_sybrandb.demon.nl>
Date: Wed, 19 Dec 2001 23:27:13 +0100
Message-ID: <g0522ug8bnb9c4uvrp57m6dcb7ev6q39ou@4ax.com>


On 18 Dec 2001 08:19:36 -0800, millhill_at_iname.com (millhill) wrote:

>Hi,
>
>I have a table with approx 50 million rows.
>One of my developers queries access this table with a set of joins and
>where clauses. I know that this select-query only gathers rows where a
>column is not NULL and this is approx just 2% of the total rows. I
>have an index on this column.
>
>Here's an example:
>
>t1 contains 50 million rows, t2 and t3 are smaller tables.
>
>select *
>from t1, t2, t3
>where t1.column1 is not null
>and t1.id = t2.id
>and t2.id = t3.id
>and t1.something = something
>and t1.something2 = something2
>
>t1.column1 is not null for approx 2% of all rows in t1 and therefore I
>would like to let oracle use the first where-clause (t1.column1 is not
>null) and only work with this sub-set for the rest of the clauses and
>joins. Is this possible?
>
>Thanx,
>-Chris

is not null won't use and index. You need to use

   >= <some arbritary minimum value for that column>

Hth

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Wed Dec 19 2001 - 16:27:13 CST

Original text of this message

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