The conversation between human and AI assistant.
How do I create private session stats on Global Temporary Tables in Oracle 11G?
Great, thank you for that. And how do I associate the stats with the appropriate session?
To associate the stats with the appropriate session, you need to use the "DBMS_STATS.SET_SESSION_STATS" procedure. This procedure takes two parameters: the name of the session and the name of the statistics object. For example, if you have created a statistics object called "my_stats", you can associate it with the current session by running the following command: "DBMS_STATS.SET_SESSION_STATS('mysession', 'my_stats');".