why do you need a programm for this???
select tablename,
(select sum(numallocatedpages*pagesize) from new
org.apache.derby.diag.SpaceTable('APP',t.tablename) x),
(select sum(estimspacesaving) from new
org.apache.derby.diag.SpaceTable('APP',t.tablename) x) from SYS.SYSTABLES t
could be improved but works and is very simple!
cheers
fabian
----- Original Message -----
From: "Kristian Waagan" <[EMAIL PROTECTED]>
To: "Derby Discussion" <[email protected]>
Sent: Wednesday, June 13, 2007 11:18 AM
Subject: Re: a command to show table file-size?
> Stanley Bradbury wrote:
> > Geoff hendrey wrote:
> >> Is there a utility or command that I can use to
> >> identify the disk space (bytes) occupied by a
> >> particular table?
> >>
> >>
> >>
> >>
> > The query listed at the link below can be used to determine the filename
> > for a table or tables in a database. You can then check the size
> > directly or feed the results into a routine that reports the size.
>
> Another option is to use DerbyDiskSpaceDiag.java attached to the
> following Jira:
> https://issues.apache.org/jira/browse/DERBY-2549
>
> It is not polished, but shows you the space of tables and indexes.
>
>
> hth,
> --
> Kristian
>
> >
> >
http://www.ibm.com/developerworks/db2/library/techarticle/dm-0408bradbury/#cs_map_filename
> >
> >
> > Note that this query requires the user function bigintToHexString be
> > created. This is documented in the section just above the one pointed
> > to by the URL provided.
> >
> > Hope this helps.
> >
> >
>