Analyze object sizes #415
-
We have recently been asked why our database is "so huge". So I have been wondering how I can find that out. Since there aren't separate files per entity, like there are tables in SQL per entity, I can't really tell. Is there some kind of API or way to do this? Couldn't find anything in the docs unless I missed it. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 13 replies
-
A "dumb" way to find out is to create an empty storage and then create like 100 entities of the same object and check how much bigger the storage file is and then calculate each entities individual size in bytes. We did this for the objects which we expected to be large to get an estimation of how big they are without having to calculate object size directly. |
Beta Was this translation helpful? Give feedback.
There is the option to get some information on the storage files:
org.eclipse.store.storage.types.StorageConnection.createStorageStatistics()
it provides the ratio of obsolete and actual data for each storage file.