HSQL时间戳和布尔数据类型的大小?

时间:2021-11-25 16:58:38

I am trying to assess how much memory a specific HSQL in-memory table is taking

我试图评估特定HSQL内存表中的内存量

I followed http://hsqldb.org/doc/guide/guide.html#sgc_types_ops to find out how much respective Data type (in byte) takes

我按照http://hsqldb.org/doc/guide/guide.html#sgc_types_ops查看了相应数据类型(以字节为单位)的数量

INTEGER
4 

VARCHAR
1

INTEGER
4

TIMESTAMP
?

BOOLEAN
?

I could not find for Timestamp and Boolean

我找不到Timestamp和Boolean

1 个解决方案

#1


0  

In-memory databases store data as Java objects in arrays. Therefore the reference to each object takes 8 bytes in a 64 bit memory space to store.

内存数据库将数据作为Java对象存储在数组中。因此,对每个对象的引用需要在64位存储空间中存储8个字节。

The size of each object varies and could be 16 bytes for Java Integer. VARACHAR is stored as Java String.

每个对象的大小各不相同,Java Integer可能是16个字节。 VARACHAR存储为Java String。

BOOLEAN is stored as Java Boolean. As there are only two Boolean objects, there is no extra overhead for a BOOLEAN column

BOOLEAN存储为Java布尔值。由于只有两个布尔对象,因此BOOLEAN列没有额外的开销

http://hsqldb.org/doc/2.0/guide/deployment-chapt.html#dec_mem_disk_use

http://hsqldb.org/doc/2.0/guide/deployment-chapt.html#dec_mem_disk_use

#1


0  

In-memory databases store data as Java objects in arrays. Therefore the reference to each object takes 8 bytes in a 64 bit memory space to store.

内存数据库将数据作为Java对象存储在数组中。因此,对每个对象的引用需要在64位存储空间中存储8个字节。

The size of each object varies and could be 16 bytes for Java Integer. VARACHAR is stored as Java String.

每个对象的大小各不相同,Java Integer可能是16个字节。 VARACHAR存储为Java String。

BOOLEAN is stored as Java Boolean. As there are only two Boolean objects, there is no extra overhead for a BOOLEAN column

BOOLEAN存储为Java布尔值。由于只有两个布尔对象,因此BOOLEAN列没有额外的开销

http://hsqldb.org/doc/2.0/guide/deployment-chapt.html#dec_mem_disk_use

http://hsqldb.org/doc/2.0/guide/deployment-chapt.html#dec_mem_disk_use