If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Space Usage in table informix

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-04-08, 06:12
georgipa georgipa is offline
Registered User
 
Join Date: Dec 2002
Location: Madrid - Spain
Posts: 283
Wink Space Usage in table informix

Hi Gurus,

I need know what is the currently space usage for a table in database.

Thank you for you help.
Reply With Quote
  #2 (permalink)  
Old 08-04-08, 10:08
ceinma ceinma is offline
Registered User
 
Join Date: Apr 2007
Location: Jundiai / SP - Brasil
Posts: 311
You can choose between 2 ways:

1) onstat -T , find the partnum of your table and get how much pages are used and multiply by page size...
2) select * from systables where tabname = "xyz" ; get the column "npused" and multiply by page size too...
__________________
________________________________________
César Inacio Martins
Jundiai / SP - Brasil
http://www.imartins.com.br/informix - em Português
http://www.imartins.com.br/informix - English (translated by Google).
________________________________________
Reply With Quote
  #3 (permalink)  
Old 08-05-08, 07:42
georgipa georgipa is offline
Registered User
 
Join Date: Dec 2002
Location: Madrid - Spain
Posts: 283
Thank you for you help.

I have this doubt, the partnum for this table is 400368, I execute this command
onstat -T |grep 400368

and the output is this.
1172 92cc54fc 2 0 400368 40:1603714 5242876 19478 19475 19475 1

the column nused is 19478 this value is multiplicate for 4 (I HAVE AIX 5.2) then this value I to divide by 1024 for to convert to MB.

If I execute unload for this table and then execute du -m file unloaded and the output is

9.53 MB.

I do not understand this outputs.
Reply With Quote
  #4 (permalink)  
Old 08-05-08, 08:08
ceinma ceinma is offline
Registered User
 
Join Date: Apr 2007
Location: Jundiai / SP - Brasil
Posts: 311
Take a look on this site:
http://www.oninit.com/onstat/index.p...atidx.php&id=t

It explains each columns of the command.

Your output appear strange.
You have 20GB of space allocated to table, but only 70kb of data...
This remember me one thing, maybe you need run a update statistics low on the table to refresh this informations.
__________________
________________________________________
César Inacio Martins
Jundiai / SP - Brasil
http://www.imartins.com.br/informix - em Português
http://www.imartins.com.br/informix - English (translated by Google).
________________________________________
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On