|
|
|
Re: Need Help In Performance Tuning [message #591381 is a reply to message #591378] |
Sat, 27 July 2013 12:15 |
John Watson
Messages: 8963 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Apart from following SB's request:
First, you must format your code properly. I do not understand how anyone can debug code that looks like yours! If you don't have a standard for this, you can always use this formatter,
http://www.dpriver.com/pp/sqlformat.htm
Second, not a tecnical issue, but you should correct the spelling of RETREIVE or you wll confuse everyone.
Third, if you believe that "temporary" tables are necessary (they are a very SQL Server concept) then you should be using Global Temporary Tables (which are an Oracle concept),
http://docs.oracle.com/cd/E16655_01/server.121/e15858/tgsql_statscon.htm#sthref523
your procedure as written will fall apart if more than one session runs the code.
Fourth, are you sure that you need those temporary tables? Can it not be done with, for instance, views?
Fifth, You do do need to find out why it is "freezing". You have only 10000 rows in each table, that is such a tiny amount of data that no matter how poor the code is, it should execute pretty quickly. Running each query wih timing on would be a good start.
|
|
|