Agent skill
analyze-performance
Analyze system performance using throttle statistics, query logs, and resource metrics to identify bottlenecks and optimization opportunities
Install this agent skill to your Project
npx add-skill https://github.com/teradata-labs/claude-cookbooks/tree/main/skills/operations/workloadmanagement/optimization/analyze-performance
SKILL.md
Analyze Performance
Perform comprehensive performance analysis across queries, sessions, workloads, and system resources to identify bottlenecks, inefficiencies, and optimization opportunities.
Instructions
When to Use This Skill
- User reports performance issues or slow queries
- Need to identify system bottlenecks
- Conducting regular performance reviews
- Preparing optimization recommendations
- Investigating SLA violations
Available MCP Tools
show_throttle_statistics- View throttle stats by query/session/workloadshow_query_log- Access historical query performancemonitor_amp_load- Check processor utilization patternsshow_awt_resources- Review task resource allocationshow_tasm_statistics- Analyze workload management effectivenessshow_top_consumers- Identify resource-heavy users/queries
Step-by-Step Workflow
-
Gather Performance Baseline
- Collect current system metrics (CPU, memory, I/O)
- Review recent query performance trends
- Identify normal vs abnormal patterns
-
Analyze Throttling Behavior
- Use
show_throttle_statisticsat different levels (query/session/workload) - Identify excessive throttling indicating resource constraints
- Determine if throttles are working as designed or causing issues
- Use
-
Examine Query Performance
- Use
show_query_logto find slow or resource-intensive queries - Sort by execution time, CPU time, I/O wait
- Identify outliers and frequently-problematic queries
- Use
-
Check Resource Utilization
- Use
monitor_amp_loadto find CPU bottlenecks or skew - Check
show_awt_resourcesfor concurrency limits - Use
show_top_consumersto identify resource hogs
- Use
-
Review Workload Management
- Use
show_tasm_statisticsto see if TASM is managing effectively - Check if workload rules are achieving desired priority
- Identify workloads with poor performance
- Use
-
Identify Root Causes
- Correlate findings across different data sources
- Distinguish between symptoms and root causes
- Categorize issues: query optimization, configuration, capacity, workload management
-
Develop Recommendations
- Prioritize issues by impact and effort
- Suggest specific optimizations:
- Query rewrites or index additions
- Workload rule adjustments
- Throttle or priority tuning
- Capacity additions
- Provide expected impact for each recommendation
Examples
Example 1: Monthly Performance Review
User: "Analyze overall system performance for the past month"
Action:
1. Pull query log statistics for the month
2. Check throttle statistics trends
3. Review TASM effectiveness metrics
4. Identify top 5 performance issues
5. Provide summary report with recommendations
Example 2: Troubleshoot Slow Queries
User: "Our reports are running slow, find out why"
Action:
1. Use show_query_log filtered for reporting queries
2. Compare recent performance vs historical baseline
3. Check if being throttled via show_throttle_statistics
4. Use monitor_amp_load to check system load during report times
5. Identify cause: "Reports delayed by 45% due to concurrent ETL workload"
6. Recommend: "Adjust workload priorities or schedule separation"
Example 3: Capacity vs Configuration Issue
User: "Do we need more hardware or just better tuning?"
Action:
1. Check peak resource utilization across all metrics
2. Analyze query efficiency (long runtime but low resource use = inefficient)
3. Review throttle statistics (high throttling = capacity issue)
4. Check workload distribution (misclassification = config issue)
5. Conclude: "70% capacity, but poor query distribution - tuning needed"
Example 4: Identify Optimization Opportunities
User: "What should we optimize first?"
Action:
1. Get top consumers and their query patterns
2. Analyze query log for repeated slow queries
3. Check for AMP skew or data distribution issues
4. Calculate potential impact of each optimization
5. Prioritize: "Optimize daily aggregation query - runs 100x/day, 15min each"
Best Practices
- Always establish baseline before diagnosing performance issues
- Look for patterns over time, not just point-in-time snapshots
- Correlate multiple data sources to confirm root causes
- Distinguish between capacity constraints and configuration issues
- Consider business context when prioritizing optimizations
- Calculate ROI: time saved vs effort to implement
- Test optimization hypotheses with data before implementing
- Monitor trends to catch degradation before it becomes critical
- Document findings and track improvement over time
- Consider interdependencies when recommending changes
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
tune-workloads
Analyze workload classification and **autonomously configure** classification rules, filters, and priorities to improve accuracy and meet business requirements
optimize-throttles
Analyze throttle behavior, recommend optimal configurations, and autonomously create/modify throttles to balance resource allocation and meet performance SLAs
monitor-workloads
Monitor workload definitions, distribution, and TASM statistics using real-time resources to understand classification effectiveness and workload performance
monitor-resources
Monitor AMP processor load, system physical resources, and capacity using real-time resources to track system health and identify performance bottlenecks
monitor-sessions
Monitor active Teradata sessions using real-time resources, view SQL execution details, identify blocking issues, and optionally take control actions
monitor-queries
Track query execution using real-time resources, analyze query bands, access query logs, and identify performance patterns across the Teradata system
Didn't find tool you were looking for?