How to calculate space taken by a volatile table?

Database
Enthusiast

How to calculate space taken by a volatile table?

 Hi Experts,

I was having a discussion with one of my peer regarding the table size calculation for a VT.  

As VT is not stored in any of the Db and is local to user which is currently logged in. 

As user is also a type of DB so shall we use the below query to get the table size-

select tablename, sum(currentperm)

from dbc.tablesizev

group by tablename

where databasename ='user name'

Please correct me  if i am wrong or add some thing here,

cheers!

Nishant

1 REPLY
Senior Apprentice

Re: How to calculate space taken by a volatile table?

Hi Nishant,

Volatile Tables are stored within spool space, you can only SUM(CurremtSpool) to get the spool size of all current sessions of that user (of course including the spool in use due to an active session), but no further details. 

Dieter