OrientDB supports various methods to get the length of a collection or the length of a string, but I’m trying to determine the total size of a record in bytes. I can’t find anything in the documentation or elsewhere that addresses this. Is it possible?
ORecord class has a getSize() method, so the information is available (even though it’s not very accurate) at the API level.
This is not exposed in SQL, but I think we can do it in the near future
Interesting. What makes it “inaccurate”?
Should I open an issue on Github for this feature request?
In the mean time, I assume the only way to access it would be through Java? What about a Java function that could be called from SQL?
It is inaccurate in the sense that it returns an approximation based on the space used on disk by the record, but this space could not have been collected after you delete properties or you change property values (just to say one case).
Yes, it is available from Java, you can use a JS function to access it and use it in SQL
Ah, OK. Easy enough. Thanks!