 |
 |
Archives of the TeradataForum
Message Posted: Thu, 07 Mar 2013 @ 13:13:18 GMT
Subj: | | Re: Find Global temporary space usage |
|
From: | | Frydryszak, Marek |
Try this one:
lock row access
sel db1.databasename GttOwner, tab.tvmname GttName, db2.databasename MaterializedBy,
ref.sessionno, tbsize.tempspace
from (sel databaseid ,tableid, sum(currenttempspace)
tempspace from dbc.databasespace group by databaseid,tableid ) tbsize join dbc.temptables
ref on tbsize.tableid=ref.tableid join dbc.tvm tab on ref.basetableid=tab.tvmid join
dbc.dbase db1 on db1.databaseid=ref.basedbid join dbc.dbase db2 on
db2.databaseid=tbsize.databaseid
| |