DynamoDB了解(未完待续)

Every local secondary index must meet the following conditions:

  • The hash key is the same as that of the source table.

  • The range key consists of a single attribute.

  • The range key attribute of the source table is projected into the index, where it acts as a non-key attribute.


可以排序 sorted by  local secondary index 


Every local secondary index automatically contains the hash and range attributes from its parent table;


可以有最多5个local secondary index:

local secondary index maintains an alternate range key for a given hash key. A local secondary index also contains a copy of some or all of the attributes from the table; you specify which attributes are projected into the local secondary index when you create the table. The data in a local secondary index is organized by the same hash key as the table, but with a different range key. This lets you access data items efficiently across this different dimension. For greater query flexibility, you can create up to five local secondary indexes per table.


检索 local secondary index 的效率没有 key的好:

. When you query the index, DynamoDB can retrieve these projected attributes efficiently. When you query a local secondary index, the query can also retrieve attributes that are not projected into the index. DynamoDB will automatically fetch these attributes from the table, but at a greater latency and with higher provisioned throughput costs.



你可能感兴趣的:(DynamoDB了解(未完待续))