Rule Definition
Rationale - Temporary objects can have adverse impact on performance and scalability. We have to make sure the tempdb is not full anytime due to excess temporary objects. The worst case scenario will be the Server will stop working if the tempdb is full. Therefore this rule allows user to know what are the temporary objects used by his application and he can take the appropriate actions to clean/remove them if they are not needed.
Remediation
Remediation - Use temporary objects only to optimize your application's performance.
Fixed Code Sample
Example: If you have to perform a multi-table join and each of these tables contains millions of rows, it will probably be better to break the original query into multiple steps. For instance, the first step could query just a couple of tables and generate an intermediate result set. The subsequent steps could then query the intermediate temporary table.
Related Technologies
Microsoft T-SQL
Sybase T-SQL
Technical Criterion
Architecture - OS and Platform Independence
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.