Mixing DDL & DML operations can cause recompilation

Software EleganceCode Complexity

Why you should care

Developers do not recommend mixing DDL and DML Operations. They are generally avoided because such mxing can cause a Recompile which results in resetting the code differently and causing a mess in the process. It is recommended to place all DDL statements at the top of the stored procedures and perform the necessary query work.

Business Impacts

It is advised that DML and DDL operations should not be mixed as they can slow down the innovative qualities of the code and cause loss of time. It also makes it unsuitable for clients to utilize a slower version of an otherwise well written code.


How we detect

This code insight establishes that functions, procedures and triggers should not have too many parameters. Depending on thresholds observed in the benchmark of thousands of applications and billions lines of code, Highlight accounts penalty points to the given scanned files.


About CAST and Highlight’s Code Insights

Over the last 25 years, CAST has leveraged unique knowledge on software quality measurement by analyzing thousands of applications and billions of lines of code. Based on this experience and community standards on programming best practices, Highlight implements hundreds of code insights across 15+ technologies to calculate health factors of a software.

See featuresHow it works