Check Memory Used by Queries
You can check the memory that a query uses by observing the high water mark for temporary memory usage. The high water mark represents the largest amount of in-use temporary space used since the high water mark was initialized or reset.
Complete the following tasks:
- Use the
ttIsql
dssize
command to checkTEMP_IN_USE_SIZE
andTEMP_IN_USE_HIGH_WATER
. Alternatively, you can query theSYS.SYSTEMSTATS
or theSYS.MONITOR
table for these values. - Call the
ttMonitorHighWaterReset
procedure to reset theTEMP_IN_USE_HIGH_WATER
to the current value forTEMP_IN_USE_SIZE
. - Execute a query.
- Use
dssize
to checkTEMP_IN_USE_HIGH_WATER
for peak memory usage for the query.