AUTHOR: http://aws.typepad.com/aws/2013/11/coming-soon-global-secondary-indexes-for-amazon-dynamodb.html LINK!

Recent AWS Customer Success Stories & Videos

More AWS Customer Success Stories...

« Amazon Kinesis - Real-Time Processing of Streaming Big Data | Main | AWS Week in Review - November 11, 2013 »

Comments

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

Keerati Inochanon

Reading the blog post, I'm not sure I understand the difference between the current Local Secondary Indexes and the new Global Secondary Indexes. Could you please elaborate and perhaps give a more concrete example? I'm on the verge of ditching DynamoDB altogether because of certain limitations in indexes and querying. I would really love to know if this new feature could be my savior. Thanks very much in advance.

Markusklems

This would be very, very helpful. Thanks!

Dan

What is the difference between this new feature and the previous Local Secondary Indexes?

Stuart Marshall

Local secondary indexes are scoped to a common hash key. Essentially, LSI provide alternate range keys. So you could have an OrderHistory table with a hash key of customer ID, a primary range key of order date, and a secondary index range key on order state. This would allow you to query for orders by date or by state for a particular customer ID.

Global secondary indexes can span hash keys. So you could have a GSI on that same OrderHistory table on the attribute of ShipTo zip code. Then you could query for all orders in a particular zip code across all customer IDs.

Tekton

Local Secondary (LSI) you still needed the hash to find things (thus Local); with globals you can just search based on one of those other indexes and get, say, all the hashes that have that.

Example for local: Image file names (LSI) uploaded by a certain user (hash) - ie all the cat pictures that are associated with your account
Example for global: Image file name (GSI) for all users (hashes) - ie all users that had cat.png as one of their files associated

Keerati Inochanon

I see. Thank you very much Stuart and Tekton for clarifications!

Ravi

Any ETA on when this is going to go live. Some of our design considerations depend on this feature and I guess we wouldn't be able to update old tables to have GSI.

plus.google.com/115935897662017528069

Hi,
any update about that? We would like to start using this feature as soon as it get's relesed!

stn

Will this allow us to do some kind of 'range query' on the hashkey ?

(beeing native or with the addition of a new 'GSI' of the hash key)
// let say a query like 'return all the records with an hkey in [hA..hB], with attributes projection ala LSI


...I know that "hkeys are indexed in an 'unordered' way"

anyway a very promising feature

Andrea Gariboldi

Great news! This will enable developers to greatly improve their productivity on dynamo. Can't wait for integrating it in
https://github.com/aaaristo/dyngodb.

Cary

Any news on this? Sounds awesome!

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