- Newest
- Most votes
- Most comments
When writing double precision floating-point numbers to Amazon Timestream for LiveAnalytics, the cost is based on the actual storage size of the data type, not the string representation you provide to the write client.
For DOUBLE data types, Timestream uses 8 bytes of storage, regardless of the precision or length of the string representation you provide. This means that even if you send a very long string representation of a number (like your example of π with 50 characters), Timestream will store it internally as an 8-byte double-precision floating-point number.
In your example calculation of write size, the value of the measure is correctly listed as 8 bytes, which is the standard size for a double-precision floating-point number. This 8-byte size is what will be used for pricing calculations, not the length of the string you use to represent the number when writing to Timestream.
It's important to note that while you can provide high-precision string representations of numbers, the actual precision stored will be limited to that of a standard double-precision floating-point number (typically 15-17 significant decimal digits). Any additional precision beyond this will be lost when the number is stored in Timestream.
So, to answer your question directly: the write cost is based on the 8-byte storage size of the DOUBLE type, not the length of the string representation you provide to the write client. You can safely use high-precision string representations without incurring additional write costs, but keep in mind that the stored precision will be limited to that of a standard double-precision float.
Sources
Metering and cost optimization - Amazon Timestream
Amazon Timestream Pricing – Time-Series Database – AWS
Accessing Amazon Timestream for LiveAnalytics using the AWS CLI - Amazon Timestream
Relevant content
- AWS OFFICIALUpdated 2 months ago
