1

Is there a way to specify which specific type of integer a property can use : int16, uint32 .. ? or is it just NUMBER ??

Second : which is the biggest integer value that we can use in RedisGraph ?

sten
  • 7,028
  • 9
  • 41
  • 63

1 Answers1

2

Currently, all integers are stored as 64-bit signed integers, so the max size will always be INT64_MAX. The largest value is theoretically implementation-defined, but on all the systems I'm familiar with this resolves to 0x7fffffffffffffff, or 9,223,372,036,854,775,807.

Since RedisGraph does not use a schema to enforce the types of properties (a.val can be an integer on one node and a string on another), values are stored in a 16-byte struct with type data, so being able to specify smaller integer types would not result in space savings.

sentientcabbage
  • 466
  • 2
  • 6
  • is there a plan to allow native types ? when using million of nodes it is big waste of memory and cpu cycles – sten Sep 10 '20 at 23:04
  • If we introduce full schema support, we'd have the option to use native types, but it would still require some thoughtful design to support the multiple modes. This isn't on the roadmap currently; I think there are larger savings for memory and CPU to be made now for more general benefit. – sentientcabbage Sep 11 '20 at 13:04