Hi all, I'm now trying to encode a set of time-varying 2D points into an InfluxDB measurement.
Suppose we write N data points (p_0 .. p_N-1) on xy-plane frequently (every second or so). N isn't large (< 20) and may occasionally change over time (e.g. every few months). The data points represents a line on the plane over time. We continuously query those data points from InfluxDB to render the line realtime or at points in time. We usually need the whole points (p_0..p_N-1) at once and never query a part of them. What the best schema for this use case? I can think of a few ideas: 1. Encode all the points as fields line p0.x=0.0,p0.y=1.0,p1.x=0.1,p1.y=0.2,... 2. Use a tag to distinguish points point name=p0 x=0.0,y=1.0 point name=p1 x=0.1,y=0.2 3. Serialize all the points as a string line value="[(0.0,1.0),(0.1,0.2)]" It's not an efficient format but just to sketch the idea. 1 looks good. I'm somehow uncomfortable with using fields names to distinguish points though. I feel better with 2 in this regard. But the problem with 2 is that reconstructing the line from the points are unnecessarily complicated: 2-A. Each point in the same line can have different timestamps. Whereas 1 guarantees that all points in the same line have the same timestamp. 2-B. How much data points do we need to query to draw the current line? There's no guarantee that fetching N data points covers all data points that are necessary to reconstruct the line. 3 looks terrible in terms of space efficiency. But it might be easiest to reconstruct the line if you have a handy text parser. It would be ideal if I could just store an array of numbers as a field value in InfluxDB. But currently there seems to be no such feature. What's the current best practice? Thanks, Mitsutoshi -- Remember to include the InfluxDB version number with all issue reports --- You received this message because you are subscribed to the Google Groups "InfluxDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/influxdb. To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/f2f4bfec-fc87-44b4-a158-262dd657c560%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
