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
ttIsqldssizecommand to checkTEMP_IN_USE_SIZEandTEMP_IN_USE_HIGH_WATER. Alternatively, you can query theSYS.SYSTEMSTATSor theSYS.MONITORtable for these values. - Call the
ttMonitorHighWaterResetprocedure to reset theTEMP_IN_USE_HIGH_WATERto the current value forTEMP_IN_USE_SIZE. - Execute a query.
- Use
dssizeto checkTEMP_IN_USE_HIGH_WATERfor peak memory usage for the query.