Re: Is is possible to tune this SQL statement?

From: Sybrand Bakker <postmaster_at_sybrandb.demon.nl>
Date: Sun, 12 Sep 1999 07:21:25 +0200
Message-ID: <937113743.27632.0.pluto.d4ee154e_at_news.demon.nl>


Without knowing the view definition and where any primary and foreign keys are, it is impossible to give any sensible advise. The distinct however would involve a sort every time. You may want to look into your sort_area_size init<sid>.ora parameter. The default is 64k, which is way too low.

Hth,

--
Sybrand Bakker, Oracle DBA

Jimmy <c6635500_at_comp.polyu.edu.hk> wrote in message
news:37DBE75A.A005EDF7_at_comp.polyu.edu.hk...

> Hello all,
>
> I create a view AAA joining 5 tables and the resulting rows is over
> 50000. I am doing query on AAA with the following SQL statements:
>
> select distinct(field) from AAA where condition...
>
> (View AAA has 50 columns, only the column with varchar2 data type is
> retrieved)
> The condition part is different each time. Is there any way to
> improve the above query time? If the fields to retrieve is only on two
> or three columns (each time one field is retrieved but the condition
> part is again different each time), can I built index on these columns
> (i.e. can I built index on view column)? Or is there other ways can
> improve the query time?
>
>
> Thanks,
> Jimmy
>
Received on Sun Sep 12 1999 - 07:21:25 CEST

Original text of this message