Great explanation. I do have a question though. At 5:38 what happens when another record with originCountry = Germany is inserted? How is it stored in the OriginCountry GSI Table (with OriginCountry being the partitiionKey)? Does the index table store multiple records having the same partitionKey?
@justsomeguy1408
2 жыл бұрын
Really appreciate your content. I was working on a DynamoDB project with a friend a while back and we were struggling with how to handle some of these queries. We always check documentation, but videos like yours are extremely helpful for making it plain and clear. The visuals are particularly helpful.
@BeABetterDev
2 жыл бұрын
Thanks so much for the kind words Alec! I'm so glad these videos are helping out so many. Cheers, Daniel
@haris1558ssss
4 жыл бұрын
I finally understood what GSIs are. Thank you so much, perfect explanation.
@BeABetterDev
4 жыл бұрын
Great to hear!
@augusto2581
11 ай бұрын
Awesome explanation, thank you very much.
@shreyatiwari7737
4 жыл бұрын
I clearly understood GSI after watching this video. Thanks for a perfect explanation.
@BeABetterDev
4 жыл бұрын
Most welcome!
@caitlinmclaren2695
2 жыл бұрын
1.6k like vs 1 dislike: I'm sure that dislike is a typo
@BeABetterDev
2 жыл бұрын
I like to think so :) Thanks for the kind words Caitlin
@learnbatta
2 жыл бұрын
awesome!!! thanks! Really appreciate your content.
@CptSupermrkt
4 жыл бұрын
Wow. I watch a lot of tech, cloud, Linux, etc. videos, and honestly this is one of the best videos I've seen. Clear, concise, to the point. Subscribed!
@BeABetterDev
4 жыл бұрын
Thank you so much for your kind words!
@SilverEagle247
3 жыл бұрын
I have read so many articles, watched so many videos on DynamoDB but none of them come close to the clarity of your explanation. U got yourself a new subscriber. Great job!
@BeABetterDev
3 жыл бұрын
Thank you so much Silver. You're kind words really mean a lot to me :)
@brittche6893
Жыл бұрын
You're hands-down the best instructor on KZitem. Even complex topics are simplified and your videos are concise and straight to the point. Thank you good sir!
@amanpreetsingh6257
3 жыл бұрын
Question on Naive approach, "FilterExpression" is applied after DynamoDb has completed "Scan" operation right ?
@BeABetterDev
3 жыл бұрын
correct!
@juhisharma3334
3 жыл бұрын
Wow I am binge watching your videos. Tech made simple and fun. Subscribed!!
@XinWongDigital
4 жыл бұрын
great video. If we use country as partition key that is not in a randam form. How do we garantee uniform distribution to our gsi table?
@JagjitBrawler
2 жыл бұрын
Any insights on the advantage of using something like DynamoDB (which I'd consider more of a document/key-value hybrid, where you essentially have to create GSI's and stuff to query based on attributes) vs. MongoDB, which doesn't have the same restrictions? I guess I'm trying to understand a use case in which DynamoDB would be superior....
@caof2005
3 жыл бұрын
You mentioned that it is allowed only 20 GSI, is that by table or by DB?
@BeABetterDev
3 жыл бұрын
Hi Carlos, thats per table.
@zPiranhaz
4 жыл бұрын
Glad that I found your channel! Good and concise explanations for DynamoDB which saves a lot of reading of the rather exhausting documentation.
@BeABetterDev
4 жыл бұрын
Thanks zPiranhaz! Your comment is exactly why I decided to start this channel - I find the existing AWS documentation makes it difficult to understand whats important, and what you can gloss over. I hope to continue making videos like this one highlighting the important concepts. Thanks again for the support.
@tanvir9982000
2 жыл бұрын
Wonderfully explained! Thanks a lot
@BeABetterDev
2 жыл бұрын
You're very welcome!
@KishanKumar-su2jp
4 ай бұрын
You Always talk about what developers really needs to understand thanks man.
@abdulmuyeez
Ай бұрын
Very helpful while i was creating my terraform script to understand whether do i need GSI or not. Subscribed!
@pengli7213
3 жыл бұрын
As mentioned in the video, it's better to use uniformed distributed key as GSI. The example uses country, I guess that is not a good choice?
@BeABetterDev
3 жыл бұрын
Hi Peng! Great point. Yes this example was more for demonstration purposes. Glad you caught on!
@patpatpat4393
3 жыл бұрын
@@BeABetterDev Hi! Thank you for answering this. I have the same concern as Peng mentioned. And, in this case, if I really need to have a GSI that allows me query on county, and sort the results by the lastUpdatedAt, what should I do?
@SimoneIovane
3 жыл бұрын
I am a "Better Dev" with your channel 🙃
@BeABetterDev
3 жыл бұрын
I'm glad I can help Simone!
@sless6928
Жыл бұрын
Your use of OriginCountry and CreationDate as the Partition/Sort keys of the GSI doesn't work as together they form the Primary Key need to be a unique combination. It's highly likely in the real world that 2 accounts would would be created in the same country on the same day which would be a Primary Key violation. Perhaps AccountId could be used as the Sort Key to guarantee uniqueness. Finding a unique Primary Key for a GSI is often quite difficult depending on the use case.
@agytjax
3 жыл бұрын
This is exactly the problem with DynamoDB (or any NoSQL DB for that matter). Creating GSI's for every new access patterns (once your main table is created) is a big maintenance hassle for projects. In RDBMS, you create indices (and not separate tables) to query on non-primary key columns only if we observe performance issues. I understand that is done to support hyper-scale, but I wanted to point this out. Finally, its all about trade-offs and DynamoDB is by no means a silver bullet. It is a call that respective project leads and architects to have to take based on what they are willing to trade off. Let's not write off RDBMS as yet !
@toto_frs620
Жыл бұрын
Thanks for the video. Creating a GSI will occupy double the space in the database?
@jonathanhle
4 жыл бұрын
So good. How do I send you a tip. Great content.
@BeABetterDev
4 жыл бұрын
Thanks so much Jonathan for your kind words! If you would like to make any contribution, I have a patreon account here: www.patreon.com/awssimplified . Thanks again and have a great week!
@jonathanhle
4 жыл бұрын
@@BeABetterDev I'm a patron! Thanks for putting out such great content.
@BeABetterDev
4 жыл бұрын
Thanks Jonathan, really appreciate the support!
@JesusAlfredoHernandezOrozco
Жыл бұрын
Great video! It explains clearly the concepts involved. I recomend it.
@jackakif
2 жыл бұрын
smooth explanation ,surely will be checking your videos first if i m confused about anything
@meoysnhaet
9 ай бұрын
Can you please explain we can use GSI for implementing Priority Queue ?
@satya4866
4 жыл бұрын
One stop shop for AWS. THIS IS PROBABLY THE BEST CHANNEL I HAVE COME ACROSS..
@BeABetterDev
4 жыл бұрын
Thanks so much Satya! Welcome to the channel!
@wenyizhang3942
4 жыл бұрын
Did you just create this channel, I can't believe how few people are following you compared to your high quality content
@BeABetterDev
4 жыл бұрын
Hi Wenyi. I created this channel less than a year ago and hope that it continues growing. Thank you so much your kind words. Welcome to the channel!
@yogiHalim
4 жыл бұрын
seconded.
@VenkatKarthickKaron
8 ай бұрын
If i have to create a Global Secondary Index for a map type of data or Nested String Data how to do so?
@mejiger
2 жыл бұрын
Best tutorials on dynamodb
@BeABetterDev
2 жыл бұрын
Thanks Mej!
@jivanmainali1742
3 жыл бұрын
should we not have different table for different collections???
@nathanielkswas
2 жыл бұрын
Stellar explanation, thank you _so_ much 🙏
@amqp9273
Жыл бұрын
oh my god, I did not suspect that GSI duplicates tables behind the scenes! What a shame of wasted space
@simranbanwait
Жыл бұрын
Great video... You can make these videos again and again every year as an update.
@nitesh2k6
4 жыл бұрын
I was totally confused about GSI Before watching your video, but after watching my concept got clear. Thanks a lot for sharing the information in very simplified manner
@BeABetterDev
4 жыл бұрын
Happy to help!
@jatinjindalj
4 жыл бұрын
@@BeABetterDev Very well explained and covering a good ground as well. One thing I am still confused about is that can we query on a partition key and an attribute from GSI in 1 query? I mean without resulting in a scan of table etc? e.g lets say the query is give me all the USA accounts which were created in last month? Will this query hit just the GSI or GSI + Primary key index?
@D3r3NB
4 жыл бұрын
It feels great to grasp everything in a video! obviously due to simple and clear explanations!
@BeABetterDev
4 жыл бұрын
Great to hear!
@MasoudGhaffarinia
Жыл бұрын
That is a great video. Thank you. One thing you might want to fix: you mentioned it is the same as having another partition key, however it would be better if you also mention that gsi does not need to be unique.
@AdityaKumar-jj9cq
5 ай бұрын
Thank you! for mentioning this
@ChrisMcFlyDude
2 жыл бұрын
Excellent explanation. Cheers.
@shoukimichaelsouri7251
4 жыл бұрын
Excellent video indeed - well presented. It would be great if you would please have a video on Local secondary index and how it compares to the GSI. In addition, the concept of parallel scan and how it will remediate scan operation, etc. Well done!
@BeABetterDev
4 жыл бұрын
Hi Shouki, Taking into account your suggestion, I recently released a video on LSIs. You can check it out here: kzitem.info/news/bejne/um6ds6OQiH-KrJw I'm definitely going to be doing a video on parallel scans in the future. Look forward to it soon!
@Rickety3263
Жыл бұрын
Please include more unskippable 30s ads
@RamaKrishnaReddy-ff6wh
4 жыл бұрын
the videos are really helpful, topics are really explained well, subscribed, thnx
@BeABetterDev
4 жыл бұрын
Glad you like them!
@rajatagarwal2379
4 жыл бұрын
This makes it so easy to clearly understand GSI and LSI !! Keep up the good work.
@BeABetterDev
4 жыл бұрын
Thanks, will do!
@uncommonsensor
Жыл бұрын
The fact that GSI can create race conditions seem very bad.
@stormingbarney4498
4 жыл бұрын
Excellent explanation - thanks and keep up the good work!
@BeABetterDev
4 жыл бұрын
Thanks so much Storming Barney!
@jriverox
4 жыл бұрын
This channel is awsome
@BeABetterDev
4 жыл бұрын
Thanks so much Jhony!
@nicknderitu6013
10 ай бұрын
I thought NoSQL was supposed to be easier but oh no
@dashmasterful
2 ай бұрын
Amazing explanation bro.
@jamescarroll489
2 жыл бұрын
Good stuff! Thanks for the content! Cost is often overlooked in these design patterns. It basically doubles your storage, correct?
@shaleenmundra8319
2 жыл бұрын
Great explanation.
@BeABetterDev
2 жыл бұрын
Thanks Shaleen!
@AjitGoel
2 жыл бұрын
One of the best explanations(video, audio, text) that I have seen or read. Thank you so much @BeABetterDev.
@BeABetterDev
2 жыл бұрын
Thank you so much for your kind words Ajit!
@alvaromartin6301
2 жыл бұрын
This is the most simple and clear explanation I've found. Thanks.
@BeABetterDev
2 жыл бұрын
Glad you enjoyed!
@GauravKumar-rh1yl
3 жыл бұрын
Very nice video
@BeABetterDev
3 жыл бұрын
Thanks!
@matc8085
3 жыл бұрын
As always love your vids. what does this mean: "GSI partition key requires uniform data distribution"
@BeABetterDev
3 жыл бұрын
Hi Matt, What I mean is that ideally the values of GSI should be unique - like a UUID, and not categorical, i.e. ORDERED, SHIPPED, DELIVERED. The latter will cause all records with the same value to be located on the same partition. Keep in mind there is a limited amount of throughput you can achieve per partition, so this may become a problem for some applications.
@CarlosICC
4 жыл бұрын
Hi, Lecturer (I'm not sure if you ever say your name)! Is there any LinkedIn profile you may want to share with me? Don't worry, I'm not an annoying recruiter, but I do work as a Data Architect for a company that you seem to know very well already :) Please, ping me in private, if you're interested.
@BeABetterDev
4 жыл бұрын
Hi Carlos, If you have any topics you would like to discuss with me, you can find my contact information on my 'about' page on my channel. Thanks
@satya4866
4 жыл бұрын
The author explains the concepts in a very nice way... Awesome thanks for posting nice stuff..
@BeABetterDev
4 жыл бұрын
Thank you Satya!
@boxers999
4 жыл бұрын
Awesome, thanks I’ve subscribed.
@BeABetterDev
4 жыл бұрын
Welcome!
@Ko0lHaNDLuKex
3 жыл бұрын
This clarified a lot of misconceptions I had around GSIs. Many thanks!
@BeABetterDev
3 жыл бұрын
Very welcome!
@praneeth0820
4 жыл бұрын
At last found answers to my questions .... great explanation 👏👏
@BeABetterDev
4 жыл бұрын
Glad it was helpful!
@aditisharma8437
3 жыл бұрын
Thank you, this was super useful!
@komal1090
3 жыл бұрын
Wow, this is one of my best channel for learning tech. Can you please write a query to get data from GSIs using python code?
@BeABetterDev
3 жыл бұрын
Thanks so much for your kind words Komal!
@warrenb7450
3 жыл бұрын
Sorry but I don't quite understand the race conditions that you describe here. Can you help me? Thank you!!
@BeABetterDev
3 жыл бұрын
Hi Peining, With Dynamo, since the GSI table is kept separately from the main table, there is a synchronization delay between the main table and the GSI table when an update occurs. For example, assume we modify a row on our main table and change its state. There is a time lag such that for a brief moment in time, before the data is synchronized to the GSI table, the data will have been committed to the main table but not the GSI table. This is the GSI race condition scenario I mentioned in the video. If you have logic such that you read from the GSI table and make a decision on what to do in your application based on the row's state, there is a possibility that the row you acquired is infact out of date. Hope this helps.
@renancirillo3580
2 жыл бұрын
Great explanation! much better than the course I've bought. Tks a lot!!
@BeABetterDev
2 жыл бұрын
Thanks Renan!
@MyRonniej
2 жыл бұрын
subscribed
@BeABetterDev
2 жыл бұрын
Thank you and welcome!
@ankitgarg568
4 жыл бұрын
I had a doubt. I read that GSIs do not support strong consistent reads, does that mean, we can't create indexes in dynamoDB (for it to support strong consistency)?
@BeABetterDev
4 жыл бұрын
Hi Ankit. You are correct, GSI's do not support consistent reads.
@reddington7364
4 жыл бұрын
I have never seen a video with 0 Dislikes. Loved the video and very informative. Thank you so much.
@BeABetterDev
4 жыл бұрын
Glad you liked it!
@tapiwanashemagwati8698
4 жыл бұрын
@@BeABetterDev Usually never comment on vids but your content is awesome, keep it up and if you create a paid course let us know!
@SwapanD
4 жыл бұрын
Need a clarity - as it is allowing up to 20 more secondary tables for a primary table, will it not consume additional space? Is that not a drawback?
@BeABetterDev
3 жыл бұрын
Hi Swapan. It is definitely a drawback and can affect the amount dynamo ends up costing.
@blameItleaveit
3 жыл бұрын
Local Secondary Indexes or Global Secondary Index Local Secondary Indexes still rely on the original Hash Key. When you supply a table with hash+range, think about the LSI as hash+range1, hash+range2.. hash+range6. You get 5 more range attributes to query on. Also, there is only one provisioned throughput. Global Secondary Indexes defines a new paradigm - different hash/range keys per index. This breaks the original usage of one hash key per table. This is also why when defining GSI you are required to add a provisioned throughput per index and pay for it.
@yogithakakarla1716
3 жыл бұрын
Much clearly explained. Have already started visiting all ur videos on Playlist
@BeABetterDev
3 жыл бұрын
Thanks so much Yogitha. If you have any recommendations of videos you'd like to see do let me know!
@SergiiStarodubtsev
Жыл бұрын
I guess there no automatic sync s when removing or updating data from primary tables and the updating gsi one?
@BeABetterDev
Жыл бұрын
Hi Sergey, the sync happens automatically for you behind the scenes.
@bluetoba
3 жыл бұрын
So, can you update the origincountry field itself? For example, you already had a GSI on origincountry and decided to update "Germany" to "Italy". Will it also update the GSI's partition key from Germany to Italy?
@huyletran1221
4 жыл бұрын
very helpful. Thank so much!
@BeABetterDev
4 жыл бұрын
You're welcome!
@MrKiraBR
2 жыл бұрын
Awesome, thanks!
@shashankdahake1453
2 жыл бұрын
There are lots of confusion and misconceptions were there, all are cleared with your one video ... Thumb up ... Thanks ...
@evawong5283
Жыл бұрын
best dynamo video
@gshan994
2 жыл бұрын
Thank you so much.
@lioneld3149
4 жыл бұрын
Nice video man, keep going, very helpfull
@BeABetterDev
4 жыл бұрын
Thank you! I appreciate the support.
@srogirala
4 жыл бұрын
This is the best explanation of GSI
@BeABetterDev
4 жыл бұрын
Thanks so much for the support!
@getvasued
4 жыл бұрын
This video makes it sound like GSI's sort key has to be the same as that of the primary key, while in reality a GSI's sort key can be an entirely different attribute (in fact, a GSI need not necessarily be a composite primary key)
@fitnecessity7386
4 жыл бұрын
Thank you for making GSI so easy to understand!
@BeABetterDev
4 жыл бұрын
Happy to help!
@thirue8237
Жыл бұрын
Great explanation
@tony098uk
3 жыл бұрын
great explination
@likhitag3771
4 жыл бұрын
Great content. Please keep up the awesome work 👍🏻
@BeABetterDev
4 жыл бұрын
Thank you Likhita!
@joshuapasaba1961
2 жыл бұрын
This is one of those tutorial videos where you just KNOW that you should immediately subscribe. This channel is a huge help for me a beginner and I look forward to watching more of your videos.
@jamestufarelli7888
4 жыл бұрын
Hey, this is a great video. I have a use case that I am having a hard time modeling with dynamoDB. I have an application that contains a list of items in your area (lets say it scales up to millions), and each user will be shown a list of items, but that item can only be shown to them ONCE. So after a user has seen an item, he/she shouldnt be shown it again. So I need to be able to query for all items in my area that the user has not seen. DynamoDB is good for query against values I know about, but what about unknown values? I thought about using Bloom filters to accomplish this, but I'm not sure if this is a good use case for dynamoDB. I am trying to avoid using a scan and filter expression since that would be costly. Thanks for your help.
@BeABetterDev
4 жыл бұрын
Hey James Thanks for the question. Bloom filter sounds like a good idea at first glance. However, it doesn't really help you too much since when you're pulling items in your area, you would need to pull the items first, followed by attempting to negate each one from your result set using your bloom filter in order to determine which ones are candidates to show. For instance, if when querying areas, you pull 10 records, you need to run your bloom filter on each one (possibly 1 by 1) to figure out if you show all 10, a subset of the 10, or none if they have all already been seen. Thinking about this a bit more, you definitely will need to keep track of which records each user has seen. I don't think there's any way around that based on your use case. However there is a question of how you store this information for optimal lookups. The two options are a) 1 record for each customer, and a column that contains a list that indicates each one they have already seen (bad idea), or b) 1 record for each customer + area they have seen combination. Based on this, I don't think Dynamo is the best option for your use case since you will likely need to do double queries (1 for regions, 1 to determine view candidates). This will likely incur some significant costs as your dataset grows. If this application does not have scaling concerns, I would suggest using a RDS based solution such as AWS aurora + some criteria based queries. If scaling is a concern, you should look into using AWS elastic search. Elasticsearch is excellent in performing "fuzzy searches" like you described and allows you to offload much of the logic you need to perform onto the data store itself. Additionally, it is horizontally scalable so dataset growth shouldnt be too much of a concern. Hope this was helpful.
@jamestufarelli7888
4 жыл бұрын
@@BeABetterDev Yes, this absolutely is helpful. Thank you! I really enjoy your videos. Please keep it up.
@BeABetterDev
4 жыл бұрын
You are very welcome and thank you for the support!
@vermoidvermoid7124
2 жыл бұрын
Any common design patterns you can recommend for the staleness issue. That would be really appreciated
@rohitkochar9022
2 жыл бұрын
Amazing talk as always. Love your videos and I have learnt a lot. One quick qs. I created a GSI on one of the date column but since I have to do a between , I had to use scan operation. Is this a bad way to get data? I can use index with query but that won't let me do any between. So is table scan on gsi an expensive operation?
@tonykirimi9998
4 жыл бұрын
Thanks a lot for this wonderful content
@BeABetterDev
4 жыл бұрын
Thanks for the support tony!
@jhonsen9842
2 ай бұрын
Comments
@flippingWebsites
4 жыл бұрын
thanks! very helpful
@BeABetterDev
4 жыл бұрын
You're welcome!
@michalis2463
4 жыл бұрын
Great video man! Keep up the good stuff!
@BeABetterDev
4 жыл бұрын
Thank you Michal! I am very glad you enjoyed
@gnaneshwarrao174
4 жыл бұрын
Race condition sounds scary. I would like to know more about them. I am sure there will be some best practices out there to properly use the API in order to not fall into it.
@sourishdutta9600
4 жыл бұрын
Really great one!! Pro 👍👌
@BeABetterDev
4 жыл бұрын
Thank you! Cheers!
@TomerBenDavid
4 жыл бұрын
Excellent!
@jumboliah13
2 жыл бұрын
fantastic content and delivery, thanks!
@Pavanadiraju
4 жыл бұрын
Hi , i have one question is there any way to implement one -many or many to many in Dynamo DB .
@regmanua
2 жыл бұрын
Very useful video, thanks! But I have one question about queries by GSI. Should we always use an IndexName option in query request, if we are looking for specific value of this GSI? I thought that KeyConditionExpression is enough, but my teammate says that IndexName must be present with value of this GSI name....
@jurilunin7600
3 жыл бұрын
In case of using GraphQL, to avoid race conditions, probably, making separate table for each entity type is better than making GSI for each entity type.
Пікірлер: 198