Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-0113 Generated by Specific Query through DB-Link
rigatony1_at_gmail.com wrote:
> The query that works, but slowly, is:
>
> SELECT bv.* FROM MY_VIEW bv
> WHERE bv.objectid in
> (select linkid from LINKS_TABLE
> where projectid = 116448
> AND blocklist = 'N')
> AND bv.GISDATASETNAME = 'XXX' ORDER BY bv.physical_length DESC
>
> However, this takes 12 seconds to return exactly one row from the
> external database. Here's the explain plan:
An ORDER BY returning one row? Why?
In what version?
And what do you mean by "the external database?" Are you talking about across a DB Link?
Assuming Oracle 9i or above run an explain plan using DBMS_XPLAN so we can see what is actually happening. The script you are using is obsolete (www.psoug.org/reference/explain_plan.html).
-- 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 Fri May 25 2007 - 19:22:08 CDT
![]() |
![]() |