I'm writing many reporting queries for my current employer utilizing Oracle's With clause to allow myself to create simple steps, each of which is a data oriented transformation, that build upon each other to preform a complex task.
It was brought to my attention today that overuse of the with clause could have negative side effects on the Oracle server's resources.
Can anyone explain why over use of the oracle with clause may cause a server to crash? Or point me to some articles where I can research appropriate use cases? I started using the With clause heavily to add structure to my code and make it easier to understand, I hope with some informative responses here I can continue to use it efficiently.
Thanks!
WITH
clauses inline as sub-queries to prove that theWITH
syntax was causing the issue? If they could prove a problem was from the clause then they should ask Oracle to create a bug for it. If the problem is more along the lines of an extremely high cost query, then it still shouldn't crash, but it is understandable that it would have an abnormally high resource drain.WITH
was probably beneficial because it caused the developers to think more about the problem as a whole and therefore eliminate the need for some sub-queries.