Loading...
Loading...
Monitor IBM i database performance including index statistics, maintained temporary indexes (MTIs), database monitors, query supervisor thresholds, and materialized query tables. Use when user asks about: (1) index usage or unused indexes, (2) maintained temporary indexes and whether to create permanent indexes, (3) database monitor configuration, (4) query supervisor thresholds, (5) MQT statistics and refresh status, or (6) tables with high MTI overhead.
npx skill4agent add ajshedivy/ibmi-agent-skills database-performanceibmiSKILL_DIR# SKILL_DIR = directory containing this SKILL.md
# Examples: ./skills/database-performance, ~/.claude/skills/database-performance
# List all database performance tools
ibmi tools --tools "$SKILL_DIR/tools/" --toolset database_performance_default
# Run a specific tool
ibmi tool get_index_statistics --tools "$SKILL_DIR/tools/"
# Run with parameters
ibmi tool get_mti_info --tools "$SKILL_DIR/tools/" --schema-name MYLIB --table-name ORDERS
# Ad-hoc SQL for custom queries
ibmi sql "SELECT * FROM QSYS2.SYSINDEXSTAT WHERE TABLE_SCHEMA = 'MYLIB' ORDER BY QUERY_USE_COUNT DESC"ibmi tool get_index_statistics --tools "$SKILL_DIR/tools/" --schema-filter MYLIBibmi tool get_unused_indexes --tools "$SKILL_DIR/tools/" --schema-filter MYLIB --unused-days 90ibmi tool get_mti_info --tools "$SKILL_DIR/tools/" --schema-name MYLIB --table-name ORDERSibmi tool get_tables_with_high_mti --tools "$SKILL_DIR/tools/" --schema-filter MYLIB --min-mti-size 1048576ibmi tool get_query_supervisor_thresholds --tools "$SKILL_DIR/tools/"tools/database-performance.yaml| Tool | Description |
|---|---|
| Index usage, key columns, size, and build history |
| Indexes not used by the optimizer |
| Maintained Temporary Indexes on a specific table |
| Active and inactive database monitors |
| Query supervisor rules and filters |
| Materialized Query Table refresh and usage stats |
| Tables with largest MTI overhead |
ibmi tool <tool_name> --tools "$SKILL_DIR/tools/" # Execute
ibmi tool <tool_name> --tools "$SKILL_DIR/tools/" --dry-run # Preview SQL
ibmi tools show <tool_name> --tools "$SKILL_DIR/tools/" # View details