Svenson's  Bulletin Board Forum Index Svenson's Bulletin Board
Bulletin Board for boat building and model airplane building enthusiasts.
 
AlbumAlbum   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SQL to show how much space your tables are using

 
Post new topic   Reply to topic    Svenson's Bulletin Board Forum Index -> DB2
View previous topic :: View next topic  
Author Message
craig
Site Admin


Joined: 19 Feb 2006
Posts: 40

PostPosted: Tue Feb 28, 2006 3:24 pm    Post subject: SQL to show how much space your tables are using Reply with quote

select
--sct.tbspace,
-- sct.tabname, sct.npages, ts.pagesize ,
sum (cast(sct.npages as double) * cast(ts.pagesize as double) ) as "Space Used"
from
syscat.tables sct, (select TBSPACE, PAGESIZE from SYSCAT.TABLESPACES) ts
where sct.tbspace = ts.tbspace
and sct.npages > 0
-- and (sct.tabschema = 'CDW' or sct.tabschema = 'STG')
-- group by sct.tbspace
-- ,sct.tabname,sct.npages,ts.pagesize
Back to top
View user's profile Send private message Send e-mail
dingdong



Joined: 28 Nov 2013
Posts: 1

PostPosted: Thu Nov 28, 2013 8:46 pm    Post subject: Reply with quote

sct.npages > 0
_________________
Smile PlzZZzzz…(Usman Malik)…!!!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Svenson's Bulletin Board Forum Index -> DB2 All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group