SQL性能健康检查脚本 (SQLHC)(文档 ID 1626277.1)
对于SQLHC（SQL Health Check，SQL性能健康检查脚本）工具，Mos文档1626277.1有非常详细的介绍。SQLHC是 Server Technologies Center of Expertise的一个工具。SQLHC用于检查单条SQL语句运行的环境，包括基于成本的优化器（CBO）的，用户对象的元数据定义， 和其它可能影响到目标SQL性能的因素。SQLHC和SQLT工具一样，本身都是的，不需要任何许可证（License）。当对某一个SQL_ID运行SQLHC后，该脚本会生成一系列针对该SQL语句健康检查的一份报告。SQLHC会检查的内容包括：① 待分析的单条SQL涉及的用户对象的CBO统计信息；② CBO参数；③ CBO系统统计信息；④ CBO数据字典统计信息；⑤ CBO固定对象（Fixed-Objects）统计信息。
SQLHC运行时不会在中创建任何对象（“数据库中不留足迹”），它只是对已有的对象提供报告和建议，可以确保它在所有系统上运行。SQLHC的脚本需要以SYS、DBA或者能访问数据字典视图的用户通过SQL*Plus连接运行。SQLHC一共包含3个脚本，分别为hc.sql、sqldx.sql和sqlhcxec.sql，其中sqlhc.sql里边会调用sqldx.sql脚本。sqlhcxec.sql是单独执行的，不过该脚本需要输入一个脚本文件作为入参，而且该脚本文件可以包含绑定变量，但是必须要有“/* ^^unique_ */”，可以包含其它的Hint，如下所示：
REM Sample SCRIPT to be used as input to sqltxecute.sql
- – execute sqlt xecute as sh passing scr t name
- – cd sqlt
- – #sqlplus sh
- – SQL> s t run/sqltxecute.sql input/sample/script1.sql
- REM Optional ALTER SESS commands N
- REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- –ALTER SESSION SET statistics_level = ALL;
- REM Optional Binds
- REM ~~~~~~~~~~~~~~
- VAR b1 NUMBER;
- EXEC :b1 := 10;
- REM SQL statement to be executed
- REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- SELECT /*+ gather_plan_statistics monitor bind_aware */
- /* ^^unique_id */
- SUM(p.prod_ _price) price
- FROM products p,
- sales s1,
- sales s2
- WHERE s1.cust_id = :b1
- AND s1.prod_id = p.prod_id
- AND s1.time_id = s2.time_id
- GROUP BY
- REM Notes:
- REM 1. SQL must contain token: /* ^^unique_id */
- REM 2. Do not replace ^^unique_id with your own tag.
- REM 3. SQL may contain CBO Hints, like:
- REM /*+ gather_plan_statistics monitor bind_aware */
- REM # sqlplus / as sys a
- REM SQL> START [path]sqlhcxec.sql [T|D|N] [path]scriptname
- REM SQL> START utl/sqlhcxec.sql T input/sample/script1.sql
- REM 1. Oracle Pack license (Tuning or Diagnostics or None) T|D|N
- REM 2. SQL_ID of interest.
- REM EXECUTION
- REM 1. Start SQL*Plus connecting as SYS or user with DBA role or
- REM user with access to data dictionary views.
- REM 2. Execute script sqlhc.sql passing sfor parameters.
- REM EXAMPLE
- REM # sqlplus / as sysdba
- REM SQL> START [path]sqlhc.sql [T|D|N] [SQL_ID]
- REM SQL> START sqlhc.sql T 51x6yr9ym5hdc
SQL 性能健康检查脚本 (SQLHC) (文档 ID 1626277.1)
|SQL Tuning Health-Check Script|
|什么是 SQL Tuning Health-Check Script? (SQLHC)|
Oracle Daase – Edition – 版本 10.2.0.1 和更高版本
Oracle Database Products > Oracle Database Suite > Oracle Database
Oracle Database – Standard Edition – 版本 10.2.0.1 和更高版本
Oracle Database – Personal Edition – 版本 10.2.0.1 和更高版本
下载 SQL Tuning Health-Check Script
在这里下载 SQLHC Script。
什么是 SQL Tuning Health-Check Script? (SQLHC)
SQL Tuning Health-Check Script 是 Oracle Server Technologies Center of Expertise 开发的一个工具。该工具也被称为 SQLHC，用于检查单条 SQL 语句运行的环境，包括基于成本的优化器（CBO）的统计数据，用户对象的元数据定义，配置参数和其他可能影响到待分析 SQL 性能的因素。
如果Diagnostic或者Tuning pack已经 了, SQLHC会收集AWR中的信息,因此它会询问是否Diagnostic或者Tuning pack已经获得了license. 关于更详细的信息,请参照SQLHC 的 licensing 部分:
如下是一个对 SQLHC 总体概述的视频资料：
SQLHC 的初衷是通过确保某一个 SQL 的运行环境合理，从而帮助用户规避一些可避免的 SQL 。
当对某一个 SQL_ID 运行 SQLHC 后，该脚本会生成一系列针对该 SQL 语句健康检查的一份 HTML 报告。您可以通过 AWR/ASH 或者查询 V$SQL 得到 SQL 语句的 SQL_ID:
- 待分析的单条 SQL 涉及的用户对象的 CBO 统计信息
- CBO 参数
- CBO 系统统计信息
- CBO 数据字典统计信息
- CBO Fixed-objects 统计信息
点击这里访问 My Oracle Support Community 数据库调优主页来发现对其他文章和主题的讨论
以 SYS, DBA 或者能访问数据字典视图的用户通过 SQL*Plus 连接运行此脚本。
- 登录数据库 并且设置数据库 环境变量
- 下载 “sqlhc. ” 并解压到一个合适的
以 SYS, DBA 或者能访问数据字典视图的用户通过 SQL*Plus 连接并执行该脚本，需要输入两个参数
Oracle Pack License (Tuning, Diagnostics or None) [T|D|N] (required)
如果有 Tuning and Diagnostics licenses 那么输入 T(指 Oracle Tuning pack，包括 Oracle Diagnostics)
- 待分析的 SQL 的有效 SQL_ID
- Oracle Pack License (Tuning, Diagnostics or None) [T|D|N] (required)
在这里下载 SQLHC Script。
NOTE:1460440.1 – Script PXHCDR.SQL: Parallel Execution Health-Checks and Diagnostics Reports
NOTE:1417774.1 – FAQ: SQL Health Check (SQLHC) Frequently Asked Questions
NOTE:224270.1 – TRCANLZR (TRCA): SQL_TR/Event 10046 Trace File Analyzer – Tool for Interpreting Raw SQL Traces
NOTE:1477599.1 – Best Practices: Proactive Data Collection for Performance Issues
NOTE:1455583.1 – SQL Tuning Health-Check Script (SQLHC) Video
NOTE:215187.1 – SQLT Diagnostic Tool
NOTE:243755.1 – Script to produce HTML report with top s out of Profiler DBMS_PROFILER data
NOTE:1482811.1 – Best Practices: Proactively Avoiding Database and Query Performance Issues
FAQ: SQL Health Check (SQLHC) Frequently Asked Questions (文档 ID 1417774.1)
In this Document
|Questions and Answers|
|Background and Structure|
|What is the SQL Tuning Health-Check Script?|
|What is the origin of SQLHC?|
|Is SQLHC an ‘advanced’ version of SQLTXPLAIN?|
|Are the underlying selects used by SQLHC available?|
|Setup and Usage|
|Where can SQLHC be downloaded from?|
|How can I identify the SQL I want to Healthcheck?|
|Does SQLHC have to execute the SQL to generate a report?|
|What if the SQL_ID in question has been aged out from memory?|
|Can SQLHC retrieve anplan from memory or the AWR?|
|Is SQLHC safe to use in a production environment?|
|Is SQLHC practical to use for complex sql statements?|
|Part of the sqlhc.sql script that inserts rows into the plan_table, but the documentation states that SQLHC Leaves “no database footprint”. How can this be the case?|
|The SQLHC Documentation states that there is no configuration required, but it does not state how to create the ‘plan_table’. How can I create the plan_table?|
|Compatible Versions and licensing|
|Is the SQLHC script the same for all versions?|
|Can SQLHC be used on Oracle 9i or below?|
|What is the licensing requirement for SQLHC?|
|What is missing from the report if the Tuning Pack is not installed?|
|When using SQLHC, is it more beneficial to have AWR than not having AWR?|
|Are the global health checks specific to any version of Oracle?|
|Does SQLHC work with –Insert appliion here–|
|Are there any limitations on using this script in a Database running EBusiness Suite?|
|Is it practical to use this tool for SAP?|
|Does this SQL Health Check tool take into consideration that the query is executed on an Exadata system/database ?|
|Are there any Exadata specific settings?|
|Can this tool be used with Data Guard?|
|How we can integrate this script in to GridControl?|
|Are there specific checks related to Peoplesoft?|
|Are there specific checks related to Siebel?|
|Compatibility with Specific Database|
|Can SQLHC be used on adatabase?|
|Can SQLHC be used on SQL that accesses a remote database?|
|Does SQLHC work withType and XML indexes?|
|Does it work with encrypted columns?|
|Does SQLHC work with LOB columns?|
|Does SQLHC advise for extended statistic or index reordering?|
|Is SQLHC RAC aware?|
|Can I use SQLHC to analyze a call to a pl/sql procedure?|
|Is there a way to run without having to execute the SQL (like EXPLAIN PLAN?)|
|Does SQLHC show multiple plans from the SQL Tuning Advisor?|
|What is the difference between SQLHC and –Insert application here–|
|How does SQLHC differ from SQLT?|
|What is the difference between SQLHC and AWR and TKProf?|
|Checks related to Statistics|
|SQLHC mentions some issues with system statistics. Are system statistics supposed to be gathered?|
|Are statistics on dictionary objects supposed to be gathered?|
|Are statistics required on temporary tables?|
|Can the tool determine whether statistics were gathered using ANALYZE instead of DBMS_STATS|
|Since 11g Oracle automates the statistics collection, why is the script checking for statistics health?|
|Does SQLHC use just the most recent statistics for health check?|
|If the statistics have been locked, then will SQLHC give the desired results?|
|Questions regarding specific checks performed|
|SQLHC says that Value A is greater than Value B. This is impossible. How can this have occurred?|
|If a collective parameter such as “OPTIMIZER_FEATURES_ENABLE” has been set, does SQLHC just report on that parameter change or on all the affected underlying parameters?|
|Does SQLHC show all the checks done or just the results that are non-compliant?|
|Is the “Tables” and “Indexes Summary” for all tables or only for the tables affected by a particular SQL?|
|Does SQLHC check the dictionary statistics against the actual values in the objects?|
|Does the health check account for bind variables in any way?|
|Will SQLHC tell you that the same SQL is used with different plans ?|
|Can the health check script help me identify changes to the explain plan over a long period of time?|
|Does SQLHC provide any advise to improve the performance or is it just a health check?|
|Does SQLT provide SQL recommendations or does it only Provide the Execution plan?|
|Is SQLHC able to identify disk I/O performance issues?|
|How is it best to use the information provided by SQLHC?|
|Does SQLHC take into account session parameter changes as well as global ones?|
|Could SQLHC not be integrated with advisor tools rather than having multiple tools?|
Oracle Database – Enterprise Edition – Version 10.1.0.2 to 184.108.40.206 [Release 10.1 to 11.2]
Information in this document applies to any platform.
This document answers some of the frequentlyed questions about the SQLHC tool.
QUESTIONS AND ANSWERS
Background and Structure
What is the SQL Tuning Health-Check Script?
The SQL Tuning Health-Check Script is a tool developed by the Oracle Server Technologies Center of Expertise. The tool, also known as SQLHC, is used to check the environment in which a single SQL Statement runs, checking checks Cost-based Optimizer (CBO) statistics,object metadata, configuration parameters and other elements that may influence the performance of the one SQL being analyzed.
An overview video about SQLHC is available here :
The intention of SQLHC is to allow users to avoid SQL Performance from being affected by avoidable problems by ensuring that the environment that an individual SQL runs in is sound.
It does this while leaving “no database footprint” ensuring it can be run on all systems.
What is the origin of SQLHC?
SQLHC is a subset of the SQL used by the SQLTXPLAIN script:
but unlike that tool, has no database footprint.
It is a relatively short SQL script that generates a HTML output. It extracts database statistic information using selects or standards (such as DBMS_XPLAN) from the database and combines that with Automatic Workload Repository (AWR) output if the correct licenses are available.
Is SQLHC an ‘advanced’ version of SQLTXPLAIN?
Quite the opposite. SQLT is far more advanced than SQLHC; while it incorporates similar checks to those done in SQLHC it is far more extensive generally. SQLHC is simply a quick health check for a statement. See:
Are the underlying selects used by SQLHC available?
SQLHC is simply a SQL script. The source code is clear in the sqlhc.sql script
Setup and Usage
Where can SQLHC be downloaded from?
See the following article for details:
How can I identify the SQL I want to Healthcheck?
SQLHC uses the SQL_ID of the desired statement to generate the Health check report. You can take the SQL_ID from an AWR or ASH report or you can select it from the database. If you are able to identify the SQL with a particular identifiable string or by some kind of unique comment such as: /* TARGET SQL */ then this will make it easier to locate. For:
Please also refer to the following document for more examples:
Does SQLHC have to execute the SQL to generate a report?
SQLHC uses the SQL_ID of a statement that has already been executed and is in memory to generate the report. It can also retrieve information on the statement from the Automatic Workload Repository (AWR) if the correct licenses are available.
What if the SQL_ID in question has been aged out from memory?
In that case the SQL would have to be re-executed because this tool is dependent upon having a current SQL_ID. Historical information could then be extracted from AWR.
Can SQLHC retrieve an explain plan from memory or the AWR?
SQLHC will access both using the SQL_ID provided, assuming you have indicated that you have the appropriate licenses.
Is SQLHC safe to use in a production environment?
It has a very very small resource requirement and performs a rollback at the end of the script so that no changes are made.
Is SQLHC practical to use for complex sql statements?
SQLHC is a good, fast way to check your SQL independent of the size of the SQL or the lication you are using.
Part of the sqlhc.sql script that inserts rows into the plan_table, but the documentation states that SQLHC Leaves “no database footprint”. How can this be the case?
The SQLHC script performs a rollback at the end. Any additions made to the plan table (or any other object) are removed at the end of the script and the original state restored.
The SQLHC Documentation states that there is no configuration required, but it does not state how to create the ‘plan_table’. How can I create the plan_table?
On most databases, the plan table is pre-created centrally and referenced by a public synonym using the ‘catplan.sql’ script from $ORACLE_HOME/rdbms/admin. If it is not there or accessible then you should check your installation logs for issues.
Compatible Versions and licensing
Is the SQLHC script the same for all versions?
Yes. The script is identical
Can SQLHC be used on Oracle 9i or below?
SQLHC was designed to work on 10g and above.
It will not work on 9i or below because it uses SQL_ID to identify the SQL and this is not available in 9i or below.
What is the licensing requirement for SQLHC?
SQLHC requires no license and is FREE.
Since SQLHC can use information from AWR reports if the Diagnostic or Tuning pack are installed, it asks if these packs are licensed at your site.
If they are licensed, then answer “Yes” to this question to perform additional checks.
If they are not licensed then Answer “No”.
You should check with your site license manager if you have doubts regarding the licensing arrangements with regard to Oracle packs.
SQLHC does NOT check for a valid license
What is missing from the report if the Tuning Pack is not installed?
SQLHC uses packs to give it access to AWR (Automatic Workload Repository) based information (AWR information is accessible via the Diagnostic pack; the Tuning pack is a superset of the Diagnostic pack so either will provide access to this information). The AWR infraure is installed by default (because the database uses AWR information for internal purposes), the real question is whether you are licensed to use it or not.
Report sections that use AWR information are annotated with a ‘captured by AWR’phrase.
These sections currently include: “Indexes Summary”, “Historical SQL Statistics (DBA_HIST_SQLSTAT)” and “Historical Execution Plans”,
If AWR information is not made available by the presence of a license for one of the aforementioned packs, used then the AWR related information in these sections will not be reported.
When using SQLHC, is it more beneficial to have AWR than not having AWR?
AWR information is a component of the diagnostic pack and is fundamental for performance diagnostics and interpretation. Generally, if you do not have AWR then you would need to use statspack but this is of limited use on later versions.
If you have enterprise editions it is very useful to have AWR to diagnose performance issues.
Specifically for SQLHC, having AWR information provides more usable diagnostic output than without, so we would recommend it but it is not a pre-requisite.
Are the global health checks specific to any version of Oracle?
Some of the checks (such as those introduced in a particular version e.g. automatic statistics gathering) are specific to versions. Otherwise, no, the checks are a combination of best practices and indicators of invalid information, among other things.
Does SQLHC work with –Insert application here–
SQLHC is a simple Health Check script that uses SQL commands run against the data dictionary to produce a report. It is a good, fast way to check your SQL for issues independent of the app you are using. This means that it can work against any SELECT generated by any application software.
We would recommend that you execute the script in SQL*Plus but you can probably execute it anywhere that can run SQL Statements.
Are there any limitations on using this script in a Database running EBusiness Suite?
Is it practical to use this tool for SAP?
Does this SQL Health Check tool take into consideration that the query is executed on an Exadata system/database ?
Are there any Exadata specific settings?
Not at this time.
Can this tool be used with Data Guard?
How we can integrate this script in to GridControl?
SQLHC is a simple SQL script that you run outside of Grid Control.
Are there specific checks related to Peoplesoft?
Are there specific checks related to Siebel?
Yes, there is at least one health check for Siebel included in SQLHC
Compatibility with Specific Database Features
Can SQLHC be used on a remote database?
SQLHC assumes that you have access to the database where you want to run the health check so connecting to a remote database will work fine.
Can SQLHC be used on SQL that accesses a remote database?
SQLHC assumes that you have access to the database where you want to run the health check so selects like :
will not work. With this select and selects like:
we suggest using SQLTXPLAIN instead of SQLHC.
Does SQLHC work with XML Type and XML indexes?
Does it work with encrypted columns?
When gathering statistics, DBMS_STATS does not treat these columns any differently from any others. Since SQLHC simply reports on the health and validity of the statistics on these columns it will work fine.
Does SQLHC work with LOB columns?
Yes it does, but since we do not collate the same type statistics information for LOB columns as standard columns and we don’t directly access these columns with standard predicates, the same output as a standard column is not provided.
Does SQLHC advise for extended statistic or index reordering?
No, extended statistics and index reordering are not considered by SQLHC
Is SQLHC RAC aware?
Yes, it reports on information available across the entire RAC (ie. AWR/statistics) and also that which is specific to the(e.g. initialisation parameters etc)
Can I use SQLHC to analyze a call to a pl/sql procedure?
Not with this tool. We recommend that you use SQLT for more advanced capabilities.
Is there a way to run without having to execute the SQL (like EXPLAIN PLAN?)
Currently, if you run SQLHC against the SQL_ID from an ‘EXPLAIN PLAN FOR’ command, it runs and completes successfully. However it does not pickup the statistics for the tables in the query, nor does it produce the current explain plan it.
For SQLHC to retrieve information the SQL has to have been executed at sometime on the instance and the SQL data still needs to be in memory or in the Automatic Workload repository. Essentially, SQLHC creates a report by extracting existing ‘historical’ data about a SQL statement. It does not execute and monitor a current statement.
Does SQLHC show multiple plans from the SQL Tuning Advisor?
Since SQLHC is designed as a lightweight health check it does not have the same functionality as a more comprehensive tool such as SQLTXPLAIN or SQL Tuning Advisor itself.
If you want to include SQL Tuning Advisor in a SQL report which includes Health Checks and much more then use SQLTXPLAIN instead (ensuring you have the appropriate license for the Advisor).
What is the difference between SQLHC and –Insert application here–
For specific details of a number of performance related database features, see:
How does SQLHC differ from SQLT?
SQLT is far more advanced than SQLHC; while it incorporates similar checks to those done in SQLHC it is far more extensive generally. SQLHC is simply a quick health check for a statement. See:
What is the difference between SQLHC and AWR and TKProf?
SQLHC, AWR and TKProf are completely different tools for different purposes.
- SQLHC is a FREE script to check the health of the environment as applies to a single SQL statement See:
- AWR is the Automatic Workload Repository and is a fundamental mechanism for the storage of general performance information in the database. Based on this stored information, reports are provided that can help diagnose and resolve issues related to the performance of the database and statements within it. See:
- TKProf is a tool that formats trace files to provide collated information about a process as recorded in that trace file. See:
Checks related to Statistics
SQLHC mentions some issues with system statistics. Are system statistics supposed to be gathered?
Statistics pertaining to the actual system itself are useful so that Oracle can determine the likely load that the queries will be running in an adjust plans accordingly. See
for more details
Are statistics on dictionary objects supposed to be gathered?
Yes. Since the cost base optimizer relies on accurate statistics it is sensible to gather statistics on all tables and maintain them. See
Alternatively Dynamic sampling can be used. See
Are statistics required on temporary tables?
It is usually best to use dynamic sampling on Global Temporary tables, because of theirnature. See:
Alternatively you can fix their statistics to a ‘general’ value to preserve a particular ‘acceptable’ access path.
See the following document for other suggestions :
Can the tool determine whether statistics were gathered using ANALYZE instead of DBMS_STATS
Although the statistics collected by ANALYZE may be different to DBMS_STATS the changes may not be sufficient to positively identify the use of ANALYZE nor is there any view that identifies ANALYZE usage or otherwise. The tool will rather identify issues with the statistics validity which is likely more important than the source for plan generation assuming the statistics are correct. the ANALYZE command should not be used in version 11 only DBMS_STATS should be used to collect statistics.
Since 11g Oracle automates the statistics collection, why is the script checking for statistics health?
Just because statistics collection is automated does not mean that large data loads or different collection intervals may not have changed them. We also cannot guarantee that the automated statistics have not been disabled.
Does SQLHC use just the most recent statistics for health check?
Yes. SQLHC uses the statistics at the time that it is run. For a more comprehensive look at the historic statistics on objects use SQLT. See:
If the statistics have been locked, then will SQLHC give the desired results?
Yes. SQLHC will give the same results whether the statistics are locked or not. Locking statistics does not prevent them from being invalid.
Questions regarding specific checks performed
SQLHC says that Value A is greater than Value B. This is impossible. How can this have occurred?
SQLHC reports on what its in the dictionary and if it finds issues it outputs a warning. It does not necessarily comment on the origin of the problem. As for potential causes, then:
- different statistics may have been collected at different times
- indexes and tables may have been collected separately when row counts were different, (for example if you gathered index stats, then deleted rows from the table and then just gathered on the table then you would have a mismatch.
and so it is possible for meaningless statistics to exist. The tool checks for such issues so that plans are not affected.
If a collective parameter such as “OPTIMIZER_FEATURES_ENABLE” has been set, does SQLHC just report on that parameter change or on all the affected underlying parameters?
SQLHC just reports on the top level parameter change. Each parameter is handled independently of each other. Individual issues may generate more than one observation
Does SQLHC show all the checks done or just the results that are non-compliant?
SQLHC shows only the not compliant observations. All Statistics and plans are shown for the associated objects however.
Is the “Tables” and “Indexes Summary” for all tables or only for the tables affected by a particular SQL?
SQLHC reports on all the tables referenced in the query you have submitted to the tool.
Does SQLHC check the dictionary statistics against the actual values in the objects?
SQLHC just compares the dictionary statistics against each other and against known bets practices
Does the health check account for bind variables in any way?
Yes, but for a more detailed analysis of the binds / histograms on relevant columns etc then SQLTXPLAIN will provide more details (SQLHC is designed to be very fast). See:
Will SQLHC tell you that the same SQL is used with different plans ?
It will show there are multiple plans but that is not the primary function of the tool. For that you would be better to use SQLT. See:
If you have an extremely large number of versions then refer to:
Can the health check script help me identify changes to the explain plan over a long period of time?
Yes, if AWR data is used.
With AWR, SQLHC could help in showing the plan changes from the one in memory compared to the one stored in the AWR repository. It will list all the execution plans of a query from the past (assuming they are still available in AWR)
Does SQLHC provide any advise to improve the performance or is it just a health check?
SQLHC does not provide any direct advice. However as a reult of implementing the suggested changes, performance may be improved. For specific SQL Tuning Advice, you should use the SQL Tuning Advisor. See:
Does SQLT provide SQL recommendations or does it only Provide the Execution plan?
SQLTXPLAIN provides far more than just the Execution plan. It generates a whole set of detailed information about a query and its execution and can also link to the tuning advisor to provide specific plan advice. You can download SQLTXPLAIN from:
Is SQLHC able to identify disk I/O performance issues?
It is not currently designed to incorporate this kind of general checks. We welcome any additional health-checks that you may suggest. If any specific health-checks are needed and not covered by this script, then as long as the health-check can be produced with a SQL Command (leaving no database footprint ) then these can be implemented in future versions.
How is it best to use the information provided by SQLHC?
SQLHC does a number of check on the validity of various statistics and parameters with a brief explanation of why they may be a cause for concern. Typically you would be running SQLHC because you are concerned about the performance of a particular SQL statement. Since invalid or ill-advised setting may cause the optimizer to pick a sub-optimal access path it makes sense to rectify any potential problems found by the health check.
So, review the findings, assess their potential impact on the statement in question and implement fixes as appropriate. The following article provides a link to a large amount of back ground knowledge:
Additionally, questions can be discussed with the MOS Database Tuning Community Members:
Does SQLHC take into account session parameter changes as well as global ones?
Could SQLHC not be integrated with advisor tools rather than having multiple tools?
SQLHC was deerately created from SQLT so as to provide a very lightweight initial check. If you want a more comprehensive report then use SQLT. See:
NOTE:1366133.1 – SQL Tuning Health-Check Script (SQLHC)
NOTE:1455583.1 – SQL Tuning Health-Check Script (SQLHC) Video
NOTE:1627387.1 – How to Determine the SQL_ID for a SQL Statement
● 本文作者：小麦苗，只 于数据库的技术，更注重技术的运用
● 本文在itpub（ ://blog.itpub.net/26736162）、 园（http://www.cnblogs.com/lhrbest）和个人 （xiaomaimiaolhr）上有 更新
● 本文pdf版及小麦苗 盘地址：http://blog.itpub.net/26736162/viewspace-1624453/
● QQ群：230161599 微信群：私聊 下载
● 于 2017-07-01 09:00 ~ 2017-07-31 22:00 在魔都完成