Amit,.
Run this against the
sysmaster database...
SELECT q1.*,
(100 * size_kb / dbs_size) :: DECIMAL(5,2) AS percent
FROM
(
SELECT
t2.owner [1,8],
t2.dbsname [1,18] AS database,
t2.tabname [1,22] AS table,
t3,name [1,10] AS dbspace,
(CURRENT - DBINFO('utc_to_datetime', ti_created)) :: INTERVAL DAY(4) TO SECOND AS life_time,
(ti_nptotal * ti_pagesize/1024) :: INT AS size_kb
FROM
systabinfo AS t1,
systabnames AS t2,
sysdbspaces AS t3
WHERE t2.partnum = ti_partnum
AND t3.dbsnum = TRUNC(t2.partnum/1024/1024)
AND TRUNC(MOD(ti_flags,256)/16) > 0
) AS q1,
(
SELECT name AS dbspace,
SUM(chksize * d1.pagesize/1024) AS dbs_size
FROM
syschunks AS d1,
sysdbspaces AS d2
WHERE d1.dbsnum = d2.dbsnum
GROUP BY 1
) AS q2
WHERE q1.dbspace = q2.dbspace
ORDER BY 6 DESC, 5 DESC;
...it will tell you which objects are in your temporary dbspace(s) and the percentage of the temporary dspace(s) being consumed by each object contained therein. It might even be one of Art's or Lester's scripts.------------------------------
Kirit Rana
------------------------------
Original Message:
Sent: Sun April 18, 2021 01:31 PM
From: AMIT PATEL
Subject: Temp dbspace usage
Hello everyone,
Hope all are safe and healthy in this pandemic.
How can I check which query/session or activity is using more Temp dbspace. We have total 32 GB temp dbspace (16 temp dbspaces with 2 gb chunk each).
Currently gets warning message for Temporary dbspace is 94% used , So willing to dig what type of SQL/session occupying more TEMP DBSPACE.
Thanks
Amit Patel
------------------------------
AMIT PATEL
------------------------------
#Informix