oracle - PL/SQL complex stored procedure -


i have stored procedure has 1.3k lines of code. stored procedure has several nested calls other procedures in same package.

the total lines of code on package around 13k. there around 25 input parameters (no cursors) , 3 out parameters including 1 cursor.

also, stored proc using few global temporary tables , full of dynamic queries.

every time try debug stored procedure lost. complex piece of code have ever seen , trying understand exact logic of stored procedure. best way approach understand stored procedure?

for ip reason won't able share code on here.

if job change job. ;)

but seriuos there no , quick approach such problem. way can refactor code. split procedure more smaller procedures following naming convention (i know 30 chars few) give better understanding piece of code do.
if have fragments of code duplicated encapsulate them in procedures. if queries long replace dynamically build queries functions generate inside. test such fuctions separately.

generally split code in small chunks , test each chunk unit tests or other way. means many hours of work.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -