Recent AWS Customer Success Stories & Videos

More AWS Customer Success Stories...

« Amazon S3 - Two Trillion Objects, 1.1 Million Requests / Second | Main | Amazon RDS for Oracle Database - Data and Network Encryption »


Feed You can follow this conversation by subscribing to the comment feed for this post.

Grayson Koonce

Is it possible to query on multiple local secondary indexes? For example get all presidents age 50 with years in office of 2?

Jeff Barr

@Grayson - You can query against a single local secondary index.

Jeff King

Thanks for the much welcomed addition!

Do the secondary indices need to be unique per hash key? The documentation does not make it immediately clear. The table structure for the LastPostIndex table (here: suggests a need for uniqueness, but I assume you work some voodoo to allow non-unique secondary indices.

Please clarify.

Jeff King

It would be great if you would allow secondary indices for hash-only primary keys. The use case may not be obvious, but the easiest way to enforce a unique hash key is to not define a range element in the primary key. But even in this structure, it may still be valuable to query against a secondary index.

Jeff King

Regarding my request for secondary indices on hash-only primary keys, upon further reflection, this is of no benefit. It would only be beneficial if one could query against a secondary index without the hash key. But since the hash key must be provided, and hash-only primary keys by definition are unique, there is never a need for secondary indices for these primary keys... (doh)

Chris Moyer

Not being able to add indexes after-the-fact seems like a miss-queue. I have a lot of use-cases for LSIs in tables I've already created, so now I have to create a dump, delete the table, re-create the table, then load the data in, all while pausing any updates I was making to the table? Seems like you could handle that automatically for me and make testing out these new features a whole lot easier...


I'd like clarification on Jeff's uniqueness question as well - your data in the example seems to answer it, but it is not clear in the documentation, and I'd like to know for sure as I'm still in the design phase of my project. This will definitely affect it's usefulness.



For anyone else with the same question looking here:

Secondary indexes do not need to be unique. All matching items will be in the response.

The comments to this entry are closed.

Featured Events

The AWS Report

Brought to You By

Jeff Barr (@jeffbarr):

Jinesh Varia (@jinman):

Email Subscription

Enter your email address:

Delivered by FeedBurner

April 2014

Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30