Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法获取和存储选择的执行时间?
select * from table1
谢谢你,拉杜。
Oracle 提供了 TIMING 命令来检查查询的执行时间。
http://infolab.stanford.edu/~ullman/fcdb/oracle/or-nonstandard.html#timing%20sql%20commands
所有 SQL 语句都存储在 V$SQL 中,但它们最终会过期。ELAPSED_TIME/EXECUTIONS 将为您提供运行查询的平均时间。
Tom Kyte开发了一个非常简单的测试工具,称为runstats,它可以为您提供出色的计时信息。