Home » RDBMS Server » Performance Tuning » query hangs
query hangs [message #222737] Tue, 06 March 2007 04:43 Go to next message
oracle_coorgi
Messages: 185
Registered: September 2006
Location: INDIA-karnataka
Senior Member
hi
i have two query which was merged into one and made one
when i run seprately i able to get the out put
when i change the quey to one puting the condtion from one query to another it gets hung
can u pls tell where iam going wrong i dont have any log for it because i unable to complie it
thanxs

Re: query hangs [message #222761 is a reply to message #222737] Tue, 06 March 2007 05:45 Go to previous messageGo to next message
martijn
Messages: 283
Registered: December 2006
Location: Netherlands
Senior Member
well .... at least send us the querys you are talking about
Re: query hangs [message #222782 is a reply to message #222761] Tue, 06 March 2007 06:25 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
And an explain plan.

I'd be very suprised if it's actually hung - it's almost certainly just taking a long time
Re: query hangs [message #222808 is a reply to message #222737] Tue, 06 March 2007 07:58 Go to previous messageGo to next message
skooman
Messages: 912
Registered: March 2005
Location: Netherlands
Senior Member
oracle_coorgi wrote on Tue, 06 March 2007 06:13
i unable to complie it


If complie means compile, than it's definitely not hung... But still, statement and error message would be nice to know.
Re: query hangs [message #222915 is a reply to message #222808] Tue, 06 March 2007 23:35 Go to previous messageGo to next message
oracle_coorgi
Messages: 185
Registered: September 2006
Location: INDIA-karnataka
Senior Member
hi
i was able run the query the
that query had distinct and at the end had order by caluse
when i took the distinct and order by caluse it ran
but now i am wonderinig how to go to get only the distinct records and order by name and enitity_type
thanxs
Re: query hangs [message #222925 is a reply to message #222915] Wed, 07 March 2007 00:06 Go to previous message
flyboy
Messages: 1832
Registered: November 2006
Senior Member
Quote:
well .... at least send us the querys you are talking about

how do you expect any answer without replying the questions first?

however i will try to deduce. you had two queries. you merged them, but did not add join condition. it results in cartesian product, so the result set is huge. however when running in toad, only first rows are displayed so it does not take that long. clauses DISTINCT or ORDER BY require full result set, so it takes long.

without seeing your query (if you are afraid because it is too large, try to remove all parts not affecting the behaviour) I can not say more.
Previous Topic: need suggestion on query which performs search on name
Next Topic: Tunned querry
Goto Forum:
  


Current Time: Sat Dec 03 01:03:23 CST 2016

Total time taken to generate the page: 0.15499 seconds