How much memory will it take to use maxlen for String type?
Hi Friends,
If I created Property as below
Property Abc as %String (Maxlen = 3000000)
how much space will be used in cache DB, if assigned "hello" to Abc?
The cache will use 3000000 bytes or 5 bytes?
This conformation is very important for my implementation
Thanks,
Prashanth
Product version: IRIS 2022.1
For a string like "hallo" Cache will use 5+2 = 7 bytes. If that "hallo..." is longer then 253 bytes then length_of_string + 4 bytes will be used and if your "hallo..." is longer then 65535 bytes then length_of_string + 6 bytes will be used.
But there is one more thing, you should know: the sum of the lengths of ALL properties, except the array(like) properties, can't be greater then that famous 3641144 magic number (if you use the standard Cache Storage). Array-like properties are those, which are stored in own nodes.
Hi Prashanth,
It is possible to view how this is stored.
Consider the following class definition.
After compiling its default Data Storage location is global: ^TEST.PropertyLenD
Creating a record:
Then viewing the record
So by default there is a single global data node made from a list of all property values.
This can also can be viewed in System Management Portal -> System Explorer -> Globals:
Kind regards,
Alex
Check this article for details.