H2 Database table size

2,077 views
Skip to first unread message

Vali

unread,
Nov 18, 2009, 9:14:01 AM11/18/09
to H2 Database
Hello,

Is there a way to compute the size of a table with the H2 engine?
Is yes some SQL example would be great.

Thank you,
Vali

Mike Goodwin

unread,
Nov 18, 2009, 12:51:21 PM11/18/09
to h2-da...@googlegroups.com
Hi Vali,

Presumably you mean the size on disk?

I think the answer will be no. Between different storage mechanisms
and string data being shared there is no easy way to define what size
of a single table is in bytes.

Regards,

mike
> --
>
> You received this message because you are subscribed to the Google Groups "H2 Database" group.
> To post to this group, send email to h2-da...@googlegroups.com.
> To unsubscribe from this group, send email to h2-database...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/h2-database?hl=.
>
>
>

Vali

unread,
Nov 19, 2009, 3:31:46 AM11/19/09
to H2 Database
Thank you for the help.

PS: Yes I was talking about the size on disk.

Best Regards,
Vali

On Nov 18, 7:51 pm, Mike Goodwin <mkpgood...@gmail.com> wrote:
> Hi Vali,
>
> Presumably you mean the size on disk?
>
> I think the answer will be no. Between different storage mechanisms
> and string data being shared there is no easy way to define what size
> of a single table is in bytes.
>
> Regards,
>

Thomas Mueller

unread,
Nov 21, 2009, 5:43:10 AM11/21/09
to h2-da...@googlegroups.com
Hi,

There is already a feature request, I will increase the priority:
"Functions to calculate the memory and disk space usage of a table, a
row, or a value."

However I don't know when I have time to implement that - not in the
near future (not this year).

One way that always works is: create a new database and insert the
data you need to know the size of. Then measure the file size.

Regards,
Thomas

Manohar Amkem

unread,
Sep 11, 2017, 3:14:39 AM9/11/17
to H2 Database
Hi Thomas,

After many tries still I am trying to find large tables in my H2 db and came to this group. Could you please help me to find the exact query if this is available now for H2 db

Regards,
Manohar 

Noel Grandin

unread,
Sep 11, 2017, 3:34:13 PM9/11/17
to h2-da...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages