DynamoDB了解(未完待续)

本文详细解释了亚马逊DynamoDB中局部二级索引的概念,包括其构成、如何使用以及与主键的区别。重点阐述了局部二级索引在提高数据查询效率方面的优势,并讨论了它们对数据检索性能的影响。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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.



转载于:https://my.oschina.net/momohuang/blog/350945

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值