Skip to content

feat(oracle): add Oracle slow log query support #2745#3270

Merged
BugsGuru merged 2 commits intomainfrom
sqle/feat-2745
Apr 23, 2026
Merged

feat(oracle): add Oracle slow log query support #2745#3270
BugsGuru merged 2 commits intomainfrom
sqle/feat-2745

Conversation

@actiontech-bot
Copy link
Copy Markdown
Member

Summary

  • Add i18n locale entries for Oracle slow log (en/zh)
  • Add DynPerformanceViewSQLAreaSlowLogTpl query template in pkg/oracle/perf.go
  • Add QuerySlowSQLs method in pkg/oracle/db.go for V$SQLAREA slow SQL retrieval

Related: https://github.com/actiontech/sqle-ee/issues/2745

新增 ApMetaOracleSlowLog 国际化条目,用于 Oracle 慢日志扫描任务类型描述。
在 message_zh.go、active.en.toml、active.zh.toml 三个文件中分别添加
中英文翻译。


在 perf.go 中新增 DynPerformanceViewSQLAreaSlowLogTpl 查询模板,
基于 V$SQLAREA JOIN DBA_USERS,按平均执行时间阈值过滤慢 SQL,
包含 EXECUTIONS > 0 防除零保护。

在 db.go 中新增 QuerySlowSQLs 方法,参考 QueryTopSQLs 实现模式,
支持采集时间窗口、慢 SQL 阈值(微秒)、用户黑名单过滤和 Top N 限制。
复用已有的 DynPerformanceSQLArea 结构体。
@BugsGuru BugsGuru merged commit ad096e0 into main Apr 23, 2026
4 checks passed
@BugsGuru BugsGuru deleted the sqle/feat-2745 branch April 23, 2026 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants