I created a plugin that runs EXPLAIN <SQL> after Executor.query/update and logs the plan to statementLog at DEBUG level (CALLABLE is skipped; failures do not affect the original query).
Source:
https://github.com/naka-sho/mybatis-explain-plugin , Maven: io.github.naka-sho:mybatis-explain-plugin:1.0.0, config: <plugin
interceptor="io.github.nakasho.mybatis.explain.ExplainInterceptor"/>.
Could you advise whether this should stay external or be considered for core/official plugins, and any improvements you’d like?
------------------------------------------
Executor.query/update 実行後に EXPLAIN <SQL> を実行し、statementLogのDEBUGに出力するプラグインを作成しました(CALLABLEはスキップ、EXPLAIN失敗は本体に影響しません)。
ソース:
https://github.com/naka-sho/mybatis-explain-plugin 、Maven: io.github.naka-sho:mybatis-explain-plugin:1.0.0、設定例: <plugin
interceptor="io.github.nakasho.mybatis.explain.ExplainInterceptor"/>。
外部プラグインで十分か、コア/公式プラグインとして検討対象になるか、改善点があればご意見をいただけますか。