Re: Dumb question again
Posted in 1998
Mariusz Malogrosz wrote:
> Hello , try this select statement , it gives you
> all table sizes in KB's order desc by size ....
>
> database sysmaster ;>
> select systabnames.tabname, sysdbspaces.name,
> round ( sum (sysextents.size)* 2/1024, 2 ) tsize>
> from systabnames, sysdbspaces, sysextents
>
> where sysdbspaces.dbsnum = round(systabnames.partnum / (1048576),0)
> and systabnames.dbsname = "eagle" # put your db name here !
> and sysextents.tabname = systabnames.tabname
>
> group by systabnames.tabname, sysdbspaces.name
>
> order by 2, 3 desc
>
It is also possible a bit easier:
database sysmaster;
select dbsname, tabname, sum (size * 4) as sz from sysextents
group by dbsname, tabname
order by sz desc;
Regards
Helmut Leininger
Bull AG / Vienna
Unix Support
Email: Helmut.Leininger@bull.net
> Mariusz Malogrosz
>
> Susan Elliott (ISG) <SusanE@fclcis.co.nz> wrote in article
> <6hhbpt$64j$1@news.xmission.com>...
> >
> > Howdy folks
> >
> > Could someone please tell me how to find out the actual size of a
> > table.. i.e. table fred is 5 gig in size.
> > I have looked at oncheck - pT, but it really doesn't make a lot of
> > sense..(2 me)
> >
> > Any help would be greatly appreciated.
> >
> > Regards
> > Suze.
> >