存档

2013年11月19日 的存档,文章数:1

ASE 15.7 SP100版本开始支持以html格式显示查询计划。

生成html形式的查询计划前需要启用一些会话级别的选项:

set statistics plan_html on
set statistics timing_html on
set statistics plan_detail_html on
set statistics parallel_plan_detail_html on
set statistics plan_directory_html "e:\"
set statistics plan_directory_html on
go

在执行SQL语句后,会在e:\发现生成了对应的查询计划html文件。

文件名称格式为:qp_username_spid_timestamp.html,比如:qp_sa_25_2013-11-19T17_48_08.html

使用浏览器打开qp_sa_25_2013-11-19T17_48_08.html,内容截图为:

禁止生成html格式的查询计划,使用选项:

set statistics plan_html off
set statistics timing_html off
set statistics plan_detail_html off
set statistics parallel_plan_detail_html off
go