|
showplan_in_xml()
The
system function
showplan_in_xml() is used to retrieve
information on
query optimization
or
query execution
from
buffers
escpecially created for storing this information,
and to output it in XML format.
This information is created using
set
commands, implemented for displaying XMS formatted documents.
Currently, a maximum of 20 queries can be stored in these buffers.
If buffer space is exhausted, all following queries will be ignored.
When accessing the buffer with the function showplan_in_xml,
all information in the buffer is deleted after execution.
To avoid that the output of XML documents, which are handled like
text
columns,
is truncated, the output size can be modified using the
set textsize
statement.
The function showplan_in_xml is available in
ASE
starting with version 15.0.
Syntax of the System Funktion showplan_in_xml()
The parameter of the System Funktion showplan_in_xml()
"N"
The parameter "N" is the number of the buffer to read.
There are overall 20 buffers containing XML documents. They
are numbered from 0 to 19.
To retrieve the full contents of the buffer, the value of the
parameter N can be set to "0".
To read only the most recent XML document from the buffer,
the value of N can be set to "-1".
Example for the System Funktion showplan_in_xml()
select showplan_in_xml(0)
go
The ouput delivers all XML documents stored in the buffer.
See also:
set,
set plan for,
See also:
ASE T-SQL - Aggregate Functions, audit_event_name(), col_length(), col_name(), curunreservedpgs(), datachange(), datalength(), data_pages(), data_pgs(), db_id(), db_name(), host_id(), host_name(), identity(), index_col(), index_colorder(), isnull(), lct_admin(), license_enabled(), lockscheme(), next_identity(), object_id(), object_name(), pagesize(), pointer_size(), ptn_data_pgs(), reserved_pages(), reserved_pgs(), rowcnt(), row_count(), syb_sendmsg(), syb_sendmsg(), System Functions, tempdb_id(), tran_dumpable_status(), tsequal(), used_pages(), used_pgs().
|