Home » SQL & PL/SQL » SQL & PL/SQL » Optimizing this query
Optimizing this query [message #324659] Tue, 03 June 2008 10:11 Go to next message
balaji23_d
Messages: 123
Registered: February 2007
Senior Member
Hi all,

When i useing this stmt in my query, It will take more time
so it will show bad performance

order by NVL(worg1.ucnworg_oper_distr_code,'00A00')


So we can modify this stamt, instead of using the NVl fn
Re: Optimizing this query [message #324663 is a reply to message #324659] Tue, 03 June 2008 10:15 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Is this NVL that is at the origin of "bad performances".
By the way, "bad" comparing to what?

Regards
Michel
Re: Optimizing this query [message #324665 is a reply to message #324663] Tue, 03 June 2008 10:19 Go to previous messageGo to next message
balaji23_d
Messages: 123
Registered: February 2007
Senior Member
No Michel,

when i tuning my query, If i used the NVL functin to be placed in order by clause...when i execute It will take more time to get the result.

So please suggest me is any other way will do this work
Re: Optimizing this query [message #324668 is a reply to message #324665] Tue, 03 June 2008 10:25 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Remove NVL.

Regards
Michel
Re: Optimizing this query [message #324706 is a reply to message #324659] Tue, 03 June 2008 13:54 Go to previous message
Bill B
Messages: 1482
Registered: December 2004
Senior Member
An order by is executed after all the rows have been selected and will not have a major effect on the actual query. Of course, if no ordering is done, it would be faster.
Previous Topic: DBMS_SCHEDULER
Next Topic: How to write a query for 4th Thursday of November in each year
Goto Forum:
  


Current Time: Sun Dec 04 00:39:09 CST 2016

Total time taken to generate the page: 0.12976 seconds