DynamoDB query() versus getItem() for single-item retrieval based on the index

后端 未结 4 606
闹比i
闹比i 2021-02-06 20:28

If I\'m retrieving a single item from my table based on the indexed hash key, is there a performance difference between query() or getItem()?

4条回答
  •  囚心锁ツ
    2021-02-06 21:17

    There is no performance difference between the two. The hash calculation in both the queries are done 1 by 1. The latter, i.e., get item is just provided as an analogy to the JPA repository/spring findOne/findById to make wiring in Spring Bean wiring/ Hibernate configs easier.

提交回复
热议问题