Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: select from a huge table
In article <74hev1$7dr$1_at_news.res.ray.com>,
cljlk_at_hotmail.com (J.K.) wrote:
> PLEASE HELP !!!!!
>
> I have a table about 7,000,000 records.
>
> I get 12 records if I use "select * from mytable where f1 = 'ref1'";
>
> but, my question is I need to use the following statement:
>
> select c1.f1, c1.f2,c1.f3 from mytable c1, mytable c2
> where c1.f1 = 'ref1' and c1.f2 <= ' c' and c1.f3 <> c2.f3;
>
> I wait for 15 min, I still can not get the result, it is hanged there.
>
> Any help will be appreciated. Many thanks.
>
>
create a index on c1.f1. It should help.
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Mon Dec 07 1998 - 19:30:33 CST