Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Optimizing Query
"Colin" <colinwinning_at_yahoo.com> wrote in message
news:8181cd1e.0110230611.1f94abca_at_posting.google.com...
> > ** First find out where the problem is. You say that you are updating
> > some rows. Remove the update and just run the select and see how long
> > it takes.
> >
>
> The update does not directly affect the query. It still takes the same
> length
> of time.
and
> Indeed. The query does seem to be simple. The problem is (I think)
> that the
> updates are causing the statistics generated to become out of date
> quickly.
The first of statements implies that the second one is a blind alley. If the loop really does run with the same performance problems whilst not performing any updates then the issue of stats is surely moot since the table is not changing in any way.
Also if the orders table is being updated then the bitmapped index on it is a very very bad idea indeed.
I'm not sure oif I ever saw the pl/sql you are actually running.
-- Niall Litchfield Oracle DBA Audit Commission UKReceived on Tue Oct 23 2001 - 09:16:23 CDT