Tom, we read your answers about using public synonyms.
But I can't exactly understand is it recommended to use public synonyms, or their number should be limited.
The matter is: historically we use public synonyms for every object such as table, view, sequence. From your answers we have known they lead to non-existing objects and reduce performance. How much the using of public synonyms influences on performance,so must we reduce
the number of public synonyms or it's not very important thing.
Ones more question: One of our server procedures gives compilation error it's too long. From documentation we know, we must divide it.
But we want know what factors restrict the size of storage procedure?
Are they permanent or tuned?
Thanks.
Nadya
You should limit your use of public synonyms.
When I write PLSQL code, I never use public synonyms in the code itself. I use schema names in the code.
I might create a single (or two or three) public synonyms for the TOP LEVEL procedure that calls the package -- the "entry point" into the system for web based systems, so users can use a URL like:
</code>
http://host/pls/application_name
instead of
http://host/pls/schema.pkg.procedure <code>
but all URLS after that would be in the form of the second one above.
Public synonyms -- they should be used purely for the convienence of the end user (limited number of entry points = limited number of synonyms).
In your code you can use:
o schema names
o alter session set current_scheme = <some name> if you don't want to use schema names.
If you have a procedure that gives you a compilation error due to size, it must be VERY large indeed (i shudder to think how large). I'm a guy who firmly believes a PROCEDURE should fit on a page -- a single screen (at the highest resolution I can get about 90 lines of code on a screen).
If it doesn't -- its too big to be called a procedure, you need to recode it in a more modular fashion.
Hopefully when you say "procedure" you really mean package -- you should only use packages and packages should have lots of little, modular, understandable procedures/functions in them.
The limit is based on the size of the generated pcode. they are permanent, burned into the database, you cannot set them.