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: Using a field with low cardinality in a where clause.

Re: Using a field with low cardinality in a where clause.

From: J.P. <jp_boileau_at_yahoo.com>
Date: 28 Mar 2002 07:39:58 -0800
Message-ID: <7e388bc3.0203280739.7a8b7ec7@posting.google.com>


If you're using 8i or higher...

How about a materialized view? This would work great...

Create a materialized view on

select distinct f1, f2, f3
from tablename;

JP

"Nabil Fanaian" <nabil_fanaian_at_fe.ro> wrote in message news:<a7u69a$47l$1_at_news-int.gatech.edu>...
> I start receiving records right away, which is what I want.
>
> Well, seems like the only way around this problem was to get rid of the
> DISTINCT clause... I was finally able to get the DISTINCT out of the SQL
> stmt and now it performs great.
>
> However, if you can think of a way to optimize the query using the DISTINCT,
> that would be even better.
>
> Nabil.
>
>
>
> "Galen Boyer" <galenboyer_at_hotpop.com> wrote in message
> news:uofh9us7i.fsf_at_rcn.com...
> > On Wed, 27 Mar 2002, nabil_fanaian_at_fe.ro wrote:
> > > However, if I remove the DISTINCT from my SQL statement, then the
> > > query completes in milliseconds.
> >
> > Does it complete, or do you start recieving records right away? I'm
> > guessing the latter.
> > --
> > Galen deForest Boyer
> > Sweet dreams and flying machines in pieces on the ground.
Received on Thu Mar 28 2002 - 09:39:58 CST

Original text of this message

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