Using the MDX Performance Utility
DeepSee provides a tool, the %DeepSee.Diagnostic.MDXUtils class, to enable you to gather query statistics and lower-level performance statistics at the same time. This class provides the %Run() method:
classmethod %Run(pMDX As %String = "", pBaseDir As %String = "", pVerbose As %Boolean = 0, ByRef pParms="", Output pOutFile="") as %Status
Given an MDX query, this method prepares and runs the query and generates files that contain diagnostic information about that query. The arguments are as follows:
pMDX — Specifies the MDX query.
pBaseDir — Specifies the base directory to which the output directory (MDXPerf) is written. The default base directory is the installation directory.
pVerbose — Specifies whether to invoke routines in verbose mode. Use 1 for yes, or 0 (the default) for no.
pParms — Specifies a multidimensional array of parameters. This array can have the following nodes:
pParms("CubeStats") — Specifies whether to generate cube statistics. Use 1 (the default) for yes, or 0 for no.
pParms("TimePERFMON") — Specifies how long, in seconds, to collect data via ^PERFMON. Specify a positive integer; the default is 15. For details, see “Monitoring Performance Using ^PERFMON” in the Caché Monitoring Guide.
pParms("pButtonsOn") — Specifies whether to also generate a ^pButtons report. Use 1 for yes, or 0 (the default) for no.
pParms("pButtonsProfile") — Specifies the name of the ^pButtons profile to use. For details, see “Monitoring Performance Using ^pButtons” in the Caché Monitoring Guide.
pOutFile — Returned as an output parameter, this argument specifies the name of the main report HTML file generated by this method.
The %Run() method generates the following files:
MDXPerf_nnnnn_nnnnn.html — Main HTML report file. This contains query statistics, the query plan, and so on.
cubename.xml — Definition of the given cube.
Cached_MDXPerf_cubename_nnnnn_nnnnn.html — ^PERFMON timed collection report for running the query when using the result cache.
For details, see “Monitoring Performance Using ^PERFMON” in the Caché Monitoring Guide.
Uncached_MDXPerf_cubename_nnnnn_nnnnn.html — ^PERFMON timed collection report for running the query when not using the result cache.
Note that DeepSee creates a result cache only for a cube that uses more than 512,000 records (by default), so this report could have the same numbers as Cached_MDXPerf_cubename_nnnnn_nnnnn.html.
hostname_date_time.html — ^pButtons report.
For details, see “Monitoring Performance Using ^pButtons” in the Caché Monitoring Guide.
Other files generated by ^pButtons. These vary by operating system.