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 > Database size

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-26-03, 06:19
adityanlal adityanlal is offline
Registered User
 
Join Date: Jul 2003
Location: Calcutta, India
Posts: 42
Question Database size

Hi! All

How can I get the total size of the database either using SMI tables or using any inbuilt utility.

Thanks & Regards
adityanlal
Reply With Quote
  #2 (permalink)  
Old 09-26-03, 10:56
lloydnwo lloydnwo is offline
Registered User
 
Join Date: Aug 2003
Location: India
Posts: 262
Re: Database size

Quote:
Originally posted by adityanlal
Hi! All

How can I get the total size of the database either using SMI tables or using any inbuilt utility.

Thanks & Regards
adityanlal
Hi adityanal,

To get the total size of the database

database sysmaster
select sum(ti_nptotal), sum(ti_npused)from systabnames, systabinfowhere partnum = ti_partnumorder by 1

Regards,

lloyd
Reply With Quote
  #3 (permalink)  
Old 09-27-03, 06:17
stealth stealth is offline
Registered User
 
Join Date: Sep 2003
Location: Philippines
Posts: 10
Wink Re: Database size

Hi
You can also do first "onstat -d" to give you how many pages used within chunks. The page size depends on the OS (either 4K or 2K).
To verify the page size, run "onstat -b" & "buffer size" will indicate
the page size used. The used pages may not necessarily mean the number of pages used by your database, because it also includes pages used by other DB's (e.g. sysmaster, sysutils, etc.), unless the database is exclusive within the dbspace.

You can also use this sql statement to get an approximate size of the
database:
1. run UPDATE STATISTICS to update system catalog tables.
2. SELECT SUM(rowsize * nrows) FROM systables

This is also approximate bec rowsize is the maximum rowsize for each row & does not include pages used by blobs in blobspaces.
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