Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Query too slow ... control execution order with optimizer hints?
Chris Neubauer wrote:
>
> Hi,
>
> I try to create a view, based on two existing views in my database. The
> output of the two existing views are about 200 records each, in less than
> one second. Now the new query sould join the first two views, but this works
> very slow, I get the result after 1800 seconds. It seems to depend on the
> execution order, is there any way to force oracle first to execute the
> sub-views and then to join the two resultsets? Are there any optimizer-hints
> to control this behavior? And if so, where and how do I have to place them?
>
> select a.field1, sum(b.field2)
> from query1 a, query2 b
> where a.key=b.key
> group by a.field1
>
> Regards
> Chris
Have you tried an explain plan? You don't show us anything about the other views, so it's hard to say.
-- Ed Prochak Magic Interface, Ltd. 440-498-3700(office) Computer consulting, database and web services.Received on Mon Dec 16 2002 - 10:21:56 CST
![]() |
![]() |