最好的 Oracle SQL 查询分析工具
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12782269/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Best Oracle SQL query analyze tool
提问by Ondrej Skalicka
I'm looking for a tool (either free or paid) capable of visualization oracle SQL query performance.
我正在寻找一种能够可视化 oracle SQL 查询性能的工具(免费或付费)。
The ultimate goal is to have a tool, that can be easily read (eg. not EXPLAIN PLAN result) and that I can use to detect slow parts of query (eg. what join with what condition is actually adding the most to the whole query cost). I do notneed automatic query optimization, I just want to see why does a query has too high cost. Also, it is best if the analyzer can run without special privileges.
最终目标是拥有一个工具,可以轻松阅读(例如,不是 EXPLAIN PLAN 结果),并且我可以用它来检测查询的缓慢部分(例如,什么加入什么条件实际上是对整个查询添加最多的)成本)。我并不需要自动查询优化,我只是想看看,为什么查询具有成本太高。此外,最好是分析器可以在没有特殊权限的情况下运行。
I've tried Quest SQL Optimizer for Oracle, which looks quite ok, but I'm missing the option to see join conditions (much like SQL Developer). Also, I'm not able to easily find what join takes up most of the query cost.
我已经尝试过 Quest SQL Optimizer for Oracle,它看起来很不错,但是我缺少查看连接条件的选项(很像 SQL Developer)。此外,我无法轻松找到占用大部分查询成本的连接。
What are your experiences? Is there a tool for this?
你有什么经验?有这个工具吗?
回答by ivanatpr
SQL Developer has built-in support for running Oracle's SQL Tuning Advisor, which is very much the kind of thing you're looking for.
SQL Developer 内置了对运行 Oracle 的 SQL Tuning Advisor 的支持,这正是您正在寻找的东西。
Long term though, you're best bet is to get familiar with the Explain Plan output. You can spot the lowest hanging fruit by first making sure there are no Cartesian joins (always bad, usually a bug in the SQL) and then checking for full scans on big tables, which means that the joins aren't relying on indexes.
但从长远来看,您最好熟悉“解释计划”输出。您可以通过首先确保没有笛卡尔连接(总是很糟糕,通常是 SQL 中的错误)然后检查大表上的完整扫描,这意味着连接不依赖于索引,从而发现最容易悬而未决的果实。
回答by DJPeter
One alternative for you could be Quest SQL Optimizer that are nicely integrated with Toad.
一种替代方案可能是与 Toad 完美集成的 Quest SQL Optimizer。