Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Optimize SELECE SQL Query
beerora wrote:
> Hi,
>
> Oracle client Version 9, OS WinXP, About 6 million rows, index on
> a.name.
>
> I have a following SQL query.
>
> Select a.id,a.name,a.age,a.class,a.tel from table01 a, table02 b
> where a.name=USER and (a.id=b.id01 or a.id=b.id02 or a.id=b.id03 or
> a.id=b.id04 or a.id=b.id05 or. a.id=b.id06)
>
> The above query took long time.
>
> How can I optimize this for better result?
>
> Thanks.
There is no such thing as version 9. Is that 9.0.1 or 9.2.0.8 or some other version inbetween?
Additionally, what is required to tune the statement is knowledge of which indexes exist, the Explain Plan (created with DBMS_XPLAN), the optimizer mode (presumably CBO), and current statistics created with DBMS_STATS using the CASCADE=>TRUE option.
Post those and we can, perhaps, help.
BTW: What hardware
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Tue Apr 24 2007 - 10:18:33 CDT
![]() |
![]() |