Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hwo to find size of index (space taken up)?

Status
Not open for further replies.

noober

IS-IT--Management
Oct 10, 2003
112
US
Is there a way to determine how much space an index takes up? I am thinking that to know how much space constraints/indexes take up and add that to the amount of space (someway) a table takes up in order to determine the total amount of space tied up by a table.

Am I on the right track?
 
Hi,

The SQL below shows some info:

select b.tabname, idxname, ti_npused pages_used
from sysmaster:systabinfo a, sysmaster:systabnames b,
systables c, sysindexes d
where ti_partnum = b.partnum and ti_partnum=c.partnum
and d.tabid=c.tabid and c.tabid > 99
and (part1!=0 or part2!=0 or part3!=0 or part4!=0 or
part5!=0 or part6!=0 or part7!=0 or part8!=0 or
part9!=0 or part10!=0 or part11!=0 or
part12!=0 or part13!=0 or part14!=0 or
part15!=0 or part16!=0)
order by 1

Regards,
Shriyan
 
Excellent thanks! You would not happen to have the same type of thing for views would you?
 
Hi,

Your doubt is right. Views are being only logical in nature does not hold any data of it's own, hence no indexes are permitted.

Regards,
Shriyan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top