Total space used including indexes
Posted in 2013
Topics: General Discussion
Hi All,
I would like to ask if someone can share on how to get the total space used
including the indexes used for a particular table. I have used "oncheck -pT
db_name:table_name" but it takes too much time. I would like to ask if this
can be done via query from the sysmaster database.
IDS version=7.3
select tablename,
size,
index_name1,
index_name1_size,
index_name2,
index_name2_size,
index_name3,
index_name3_size
from table
I really appreciate your help on this.
thank you.
Two step process:
> select sf.partn
> from systables st, sysfragments sf
> where st.tabid = sf.tabid
> and st.tabname = 'sequential_scans'
> and sf.indexname is not null;
partn
5242914
5242915
2 row(s) retrieved.
> select partnum from systables where tabname = 'sequential_scans';
partnum
4194919
1 row(s) retrieved.
> database sysmaster ;
Database closed.
Database selected.
> select partnum, npused, npdata from syspthdr where partnum in
(4194919,5242914,5242915);
206: The specified table (syspthdr) is not in the database.
111: ISAM error: no record found.
Error in line 1Near character position 46
> select partnum, npused, npdata from sysptnhdr where partnum in
(4194919,5242914,5242915);
partnum npused npdata
4194919 13140 13061
5242914 31 0
5242915 2473 2
3 row(s) retrieved.
>
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
other organization with which I am associated either explicitly,
implicitly, or by inference. Neither do those opinions reflect those of
other individuals affiliated with any entity with which I am affiliated nor
those of the entities themselves.
On Thu, Feb 7, 2013 at 5:01 AM, JACK PAPA <informix2009@gmail.com> wrote:
> Hi All,
>
> I would like to ask if someone can share on how to get the total space used
> including the indexes used for a particular table. I have used "oncheck -pT
> db_name:table_name" but it takes too much time. I would like to ask if this
> can be done via query from the sysmaster database.
>
> IDS version=7.3
>
> select tablename,>
> size,
>
> index_name1,
>
> index_name1_size,
>
> index_name2,
>
> index_name2_size,
>
> index_name3,
>
> index_name3_size
>
> from table
>
> I really appreciate your help on this.
>
> thank you.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--e89a8fb1f8d07a864e04d520dc30