Search Postgresql Archives

jsonb on-disk size calculation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




hi.

drop table x;
create table x(js jsonb);
insert into x select '{"Hello world":1}'::jsonb;
select pg_column_size(js) from x; -- return 33.

based on src/include/utils/jsonb.h
The key and value part is 20 bytes (is it correct?), Jsonb->vl_len_  is 4 byte, JsonbContainer->header is 4 bytes. That's 28 bytes.

but now on-disk is 33 bytes. 
so I am not sure where the remaining bytes are.






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux