Display all user threads and session memory usage
Use the onstat -g ses command to display all user sessions and memory usage by session ID.
When the session shares the memory structures in the SSC, the value in the used
memory column should be lower than when the cache is turned off. For example, onstat -g ses output when the SQL statement cache is not enabled shows sample onstat -g ses output when
the SQL statement cache is not enabled.
onstat -g ses output when the SQL statement cache is enabled shows output after the SQL statement cache is enabled
and the queries in Session 4 are run again. onstat -g ses output when the SQL statement cache is not enabled shows
that Session 4 has 45656 bytes of used memory. onstat -g ses output when the SQL statement cache is enabled shows
that Session 4 has less used bytes (36920) when the SQL statement cache is enabled.
onstat -g ses output when the SQL statement cache is enabled also shows the memory allocated and used for Session 16, which runs the same SQL statements as Session 4. Session 16 allocates less total memory (40960) and uses less memory (38784) than Session 4 (onstat -g ses output when the SQL statement cache is not enabled shows 53248 and 45656) because Session 16 uses the existing memory structures in the SQL statement cache.