Hi,

We've been using InfluxDB for some time now, although there are some 
differences in how we are structuring data.

One approach is to take each measurement as a top-level entity, so then the 
series would be:

{
    "results": [
        {
            "series": [
                {
                    "columns": [
                        "key"
                    ],
                    "values": [
                        [
                            "cache_hit,host=foo,region=eu-west-1"
                        ],
                        [
                            "cache_miss,host=foo,region=eu-west-1"
                        ],
                        [
                            "response_time_x,host=foo,region=eu-west-1"
                        ]
                    ]
                }
            ]
        }
    ]
}

...so each measurement is at the top-level.

However, another approach is to group them in a top-level series and have 
multiple keys for each measurement. So, the series would be:

{
    "results": [
        {
            "series": [
                {
                    "columns": [
                        "key"
                    ],
                    "values": [
                        [
                            "cache"
                        ],
                        [
                            "timing"
                        ]
                    ]
                }
            ]
        }
    ]
}

...and the measurements for cache operations would be within 'cache' and all 
for timings would be in 'timing'. Therefore the field keys would be:

{
    "results": [
        {
            "series": [
                {
                    "name": "cache",
                    "columns": [
                        "fieldKey"
                    ],
                    "values": [
                        [
                            "hit"
                        ],
                        [
                            "miss"
                        ]
                    ]
                },
                {
                    "name": "timing",
                    "columns": [
                        "fieldKey"
                    ],
                    "values": [
                        [
                            "response_time_x"
                        ]
                    ]
                }
            ]
        }
    ]
}


I know how we'd approach it if we were saving this data into a relational 
database, but which is the most 'InfluxDB' way of doing it? Are there any 
performance trade-offs to having things organised in different ways?

Thanks,

Beth

-- 
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/b3a70104-1244-4e54-a547-90f36ff095bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to