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년 전1167회 조회
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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠