Timesream multi-measure vs single measure record - best practices

0

I have 3 types of devices in the same site (I need them in the same table, cause join between tables is not supported) device A - have 3 measures: temperature, power, voltage device B - have 3 measures: temperature, power, soc device C -have 2 measures: temperature, power

I have 2 option - which on is the best?

  1. single measure table
  2. multi measure table - however soc and/or voltage column will be null in more than half of the records.

Will the answer be any different if there was 20 common measures (that exists in all record) and 2 specific measures (that exist in only some of the records)? What about 10 common and 1 specific? Is there any rule of thumb or best practice when to choose multi over single? Is there any cost to an empty column in a multi record table?

Thank You!!

  • I would love to know this as well! Specifically whether there is a cost associated with empty measures in multi-measure records. What if I have 250 different measures and almost always receive just one or two of them at the same time? (But sometimes many more)

已提問 2 年前檢視次數 1183 次
1 個回答
0

One of the reasons to choose multi measure table is if the query pattern involves comparison between different measures in the same query For e.g. return all rows where avg(temperature) > avg(power). If the measures are stored in a single measure table, then the query is complicated and involves multiple CTEs. With multi measure table the query is simple and intuitive.

Timestream supports joins between tables but joins come with their own cost depending upon the number of rows to be joined.

Timestream does not support NULL values on ingestion and hence if the ingested record does not include a measure, then it will be not charged for storage.

AWS
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南