db2-sql-expert

Design and optimize DB2 for i SQL queries with explain plans and indexing guidance.

Updated Feb 27, 2026
One-click install
npx skills add https://github.com/SylvainArmonie/armonie-group-armonie-ibmi-skills --skill db2-sql-expert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db2-sql-expert
Source: https://github.com/SylvainArmonie/armonie-group-armonie-ibmi-skills/tree/main/plugins/armonie-ibmi-skills/skills/db2-sql-expert
Command: npx skills add https://github.com/SylvainArmonie/armonie-group-armonie-ibmi-skills --skill db2-sql-expert

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

DB2 for i SQL Expert helps developers design, explain, and optimize DB2 for i SQL queries by enforcing explainability, performance best practices, and modernization patterns.

Core Features & Use Cases

  • Explain plan generation and Visual Explain for bottleneck identification.
  • Provide indexing guidance (MTI, EVI, IOA) and query optimization strategies.
  • Support for UDF/UDTF, stored procedures, triggers, MQT, RCAC, JSON/XML generation, and IFS access.

Quick Start

Run a simple SELECT against a schema-qualified table to see an explained plan and recommended index changes.

Frequently Asked Questions about db2-sql-expert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize slow DB2 for i SQL queries?

To optimize slow DB2 for i SQL queries, generate an explain plan to identify bottlenecks and apply recommended indexing strategies like MTI, EVI, or IOA. This ensures explainable, optimized, and maintainable production-grade SQL performance.

What is the best way to generate JSON or XML data from DB2 for i?

Generating JSON or XML data from DB2 for i is best handled by using advanced SQL features for native data generation. This enables direct formatting of query output for modern applications while maintaining robust production-grade SQL performance.

Can I use UDF and UDTF in DB2 for i stored procedures and triggers?

Yes, you can use UDF and UDTF within DB2 for i stored procedures and triggers. Designing and integrating these functions properly enables you to build robust, maintainable, and production-grade SQL logic efficiently.

When do I need QAQQINI governance for DB2 for i SQL?

You need QAQQINI governance for DB2 for i SQL when you must enforce specific environment settings and query optimization rules across your system. Proper governance ensures consistent performance and modernization through views and RCAC.

Does Visual Explain work for identifying DB2 for i query bottlenecks?

Yes, Visual Explain works effectively for identifying DB2 for i query bottlenecks. It generates detailed explain plans that reveal execution path issues, allowing you to apply targeted indexing strategies and query optimizations for production-grade SQL.