Efficient way to store tuples in a data warehouse

If I have a couple of floats, is it more efficient (computationally or storage) to store them as GeoPtProperty, than to sort the tuple and store it like BlobProperty?

If you are GeoPtdoing something smarter to save multiple values ​​in one property, is it possible to use it for arbitrary data? Can I store a tuple ("Johnny", 5)in the same object with a similar effect?

+5
source share
2 answers

Here are some empirical answers:

GeoPtProperty uses 31B of storage space.

Use BlobPropertydepends on what you store:

  • struct.pack('>2f', lat, lon) = > 21B.
  • pickle (v2), 2-, = > 37B.
  • pickle (v0) 2-, float = > 30B-32B (v0 ascii float).

, , GeoPt - . , struct . struct, , , / GeoPt.

, , , CompressedBlobProperty aetycoon.

: . . ( ).

+3

GeoPt (-90 - 90, -180 - 180); , .

; , SetProperty ArrayProperty aetycoon.

0

All Articles