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: distinct with <>

Re: distinct with <>

From: Matthias Hoys <idmwarpzone_NOSPAM__at_yahoo.com>
Date: Mon, 9 May 2005 09:59:08 +0200
Message-ID: <427f184d$0$7756$ba620e4c@news.skynet.be>

"vegas_girlie" <minnie_valerie_at_hotmail.com> wrote in message news:1115621181.132167.209590_at_o13g2000cwo.googlegroups.com...
> hi,
> i am trying to extract data out from an oracle server and am having a
> tough time with the most basic sql statement. when i run
>
>
> SELECT distinct tcof.EML_ADDRESS from
> test.EML a,
> eml_addr_t b
> where rtrim(a.EML_ADDRESS) = a.EML_ADDR
>
>
> i get returned values. however when i run
>
>
> SELECT distinct a.EML_ADDRESS from
> test.eml a,
> eml_addr_t b
> where rtrim(a.EML_ADDRESS) <> b.EML_ADDR
>
>
> the query runs forever. i also tried the != and NOT IN and they all
> run for hours. there are only about 6500 records in the a table and
> the b table contains 30 million records. is it because i dont have any
> indexes on table a?
>

Are your table/index statistics up to date ? Try refreshing them with DBMS_STATS.GATHER_TABLE_STATS(...)

Matthias Received on Mon May 09 2005 - 02:59:08 CDT

Original text of this message

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