You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by "Bergquist, Brett" <BB...@canoga.com> on 2013/03/12 17:22:15 UTC

Trying to determine the space used by tables and indexes in the database

Derby is 18.8.   From the Derby 10.8 reference manual, I fiind:

SELECT T2.*
FROM
SYS.SYSTABLES systabs,
TABLE (SYSCS_DIAG.SPACE_TABLE()) AS T2
WHERE systabs.tabletype = 'T'
AND systabs.tableid = T2.tableid;


If I try to run that, I get:

Error: No constructor was found with the signature org.apache.derby.diag.SpaceTable().  It may be that the parameter types are not method invocation convertible.
SQLState:  42X75
ErrorCode: -1

Any ideas on how to run that to get the space used by each table/index?



RE: Trying to determine the space used by tables and indexes in the database

Posted by "Bergquist, Brett" <BB...@canoga.com>.
Thanks Rick.   I found that on the Derby wiki and did use that.  I just thought maybe I was doing something wrong.  Glad to see it is a bug in the documentation and not a bug in the implementation (other than not being present in 10.8).

-----Original Message-----
From: Rick Hillegas [mailto:rick.hillegas@oracle.com] 
Sent: Tuesday, March 12, 2013 2:24 PM
To: derby-user@db.apache.org
Subject: Re: Trying to determine the space used by tables and indexes in the database

Hi Brett,

It seems as though a doc fix was propagated back to 10.8 but the corresponding code fix wasn't. The old way of invoking SPACE_TABLE is still documented in the 10.4 docs:

SELECT T2.*
     FROM
         SYS.SYSTABLES systabs,
         TABLE (SYSCS_DIAG.SPACE_TABLE(systabs.tablename)) AS T2
     WHERE systabs.tabletype = 'T';

Hope this helps,
-Rick

On 3/12/13 9:22 AM, Bergquist, Brett wrote:
>
> SELECT T2.*
>
> FROM
>
> SYS.SYSTABLES systabs,
>
> TABLE (SYSCS_DIAG.SPACE_TABLE()) AS T2
>
> WHERE systabs.tabletype = 'T'
>
> AND systabs.tableid = T2.tableid;
>




Re: Trying to determine the space used by tables and indexes in the database

Posted by Rick Hillegas <ri...@oracle.com>.
Hi Brett,

It seems as though a doc fix was propagated back to 10.8 but the 
corresponding code fix wasn't. The old way of invoking SPACE_TABLE is 
still documented in the 10.4 docs:

SELECT T2.*
     FROM
         SYS.SYSTABLES systabs,
         TABLE (SYSCS_DIAG.SPACE_TABLE(systabs.tablename)) AS T2
     WHERE systabs.tabletype = 'T';

Hope this helps,
-Rick

On 3/12/13 9:22 AM, Bergquist, Brett wrote:
>
> SELECT T2.*
>
> FROM
>
> SYS.SYSTABLES systabs,
>
> TABLE (SYSCS_DIAG.SPACE_TABLE()) AS T2
>
> WHERE systabs.tabletype = 'T'
>
> AND systabs.tableid = T2.tableid;
>