How to list the stored procedures that contains more than seven join operations in SQL Server database? -
i have database contains more thousand stored procedures. need list stored procedures contain more 7 join operations optimization purpose.
is there way this?
just examine routine_definition field in information_schema.routines table
select routine_name information_schema.routines (len(routine_definition) - len(replace(routine_definition, 'join', ''))) / len('join')>=7
Comments
Post a Comment