get_cached_routine_stats
Retrieve cached execution statistics for Azure SQL stored procedures and functions, including bounded metrics and missing-index flags, without raw plan XML.
Instructions
Get cached stored procedure and UDF execution statistics. Returns bounded routine metrics and missing-index flags without raw plan XML.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum routines per section. | |
| sort_by | No | Sort by execution_count, total_worker_time, avg_worker_time, total_elapsed_time, avg_elapsed_time, total_logical_reads, total_physical_reads, or total_logical_writes. | total_worker_time |
| routine_type | No | Routine type: all, procedure, or function. | all |
| database_name | No | Optional database name. Defaults to AZURE_SQL_DEFAULT_DATABASE. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||