Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: help me to improve sql, plz
Improving queries starts with asking lots of questions
Do you have indexes on ir.figw and gw.fiid?
How many rows are in these tables?
What hardware and operating system?
How many CPUs?
How long does the query currently take?
What is your target for it after it is optimized?
Have you run Explain Plan?
What version of Oracle?
What patches if any?
Daniel Morgan
Alexei Fedotov wrote:
> no aggregations, no functions, consider only these two tables, selecting any fields
>
> select *
> from ir, gw
> where
> (ir.figw in (select fiid from gw) or ir.figw is null)
> and ir.figw = gw.fiid (+)
>
> it is an outer join but we cannot guarantee the data consistency
>
> damorgan <dan.morgan_at_ci.seattle.wa.us> wrote in message news:<3C742B33.C22B6BBD_at_ci.seattle.wa.us>...
> > If you had actually provided some SQL someone could. What is this?
> >
> > Are you selecting any fields? Doing any aggregations? Using any functions?
> > Linking an unending list of tables? Connecting the tables via what fields?
> >
> > Daniel Morgan
> >
> >
> >
> > Alexei Fedotov wrote:
> >
> > > could you help me to improve sql
> > >
> > > select
> > > ...
> > > from ir, gw, ...
> > > where
> > > ...
> > > and (ir.figw_src in (select figw_id from gw) or ir.figw_src is null)
> > > and ir.figw_src = gw.figw_id (+)
Received on Tue Mar 12 2002 - 09:58:45 CST
![]() |
![]() |