Menu

DynamoDB changed how it bills a vector read
📰

DynamoDB changed how it bills a vector read

DEV Community: aws·Martin Hicks·4 days ago
#1hvOSPVM
#devtoaws#devto#dev#size#vector
Reading 0:00
15s threshold

On 9th October I pinned a test in Parity Suite that said a read of a particular DynamoDB item costs 2 read units. On 22nd October, while getting the 3.7.0 release ready, the same read against real DynamoDB cost 1. Same item, same request. I can't find anything from AWS saying it changed.

The item has a vector in it, and vectors are the one place I know of where DynamoDB keeps two sizes for an item.

Two sizes for one item

A vector in DynamoDB is a list of numbers. Stored, each number is sized the way DynamoDB sizes any number: roughly one byte per two significant digits, plus one. A 38-digit integer is 20 bytes. The list adds 3 bytes, and 1 more per element.

Billed, it's different. Once a vector index reads the attribute, a write charges it at its name plus 4 bytes per dimension, whatever numbers are in it. That's the size of a 32-bit float, which is presumably what the index holds.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.