Really good content! Well presented! No annoying background music. No annoying intro to the channel. No "Hey what's up guys". No strange accent; Just good, plain English.
Excellent video! The release of your video is fortuitous - I am studying for my first AWS certification and just completed a dynamoDB lab the other night. However none of these subtleties you described were highlighted. Thanks for providing your insights. 👍
Good video, but I don’t quite understand how query lookup is O(1). How is that possible if we are searching the table for the matches to our query? Isn’t it based on the size of our table, so O(n) or larger?
It's because the database is sharded based on the partition key, so the data is grouped into partitions that are indexed by the partition keys. This means it's an O(1) hash lookup to get to the start of the partition. Also within a single partition items are indexed by the sort key, so if you also have that in your query it will be another O(1) lookup on top of the first. If you just have the partition key it will be O(partition size), which is probably still a lot smaller than your table size
Great video, dude! In my case, I'm using PK , but I have others 3 GSIs. The behavior is the same using GSI and his sort key comparing with PK + his sort key? thanks in advance!
Very nice video! Very educational. What if in my Customer Order table I have other fields like "Country" and "Product Type" and I want to filter, for example, "Tech" products bought in the "US". How will I query or fetch that data?
Hi Moneesh, I don't know of any built-in method to do this beyond using multiple threads and firing off separate queries. There's a good article on this topic by AWS here: aws.amazon.com/blogs/database/use-parallelism-to-optimize-querying-large-amounts-of-data-in-amazon-dynamodb/ Hope this helps
Can you do operations like give me all customers with id greater than 1 on the partition key? Or are you limited to one value for the partition key for each query?
Nice video. Question: How should be format the datetime for using query with between? dd:mm:yyyy hh:mm:ss? Or do we need to separate date and time? Any suggestions about querying dt columns.
Personally, I convert DateTimes to Unix timestamps. 28:10:2021 20:00:00 => 1635447600. You can then query for values less than, greater than, or between the dates.
In my case i want to scan all data each time to compare with my response to know where update occur or insert and according to that i want to perform other requests...so what could be the best possible way?
Really good content! Well presented! No annoying background music. No annoying intro to the channel. No "Hey what's up guys". No strange accent; Just good, plain English.
Glad you enjoyed it!
Excellent video! The release of your video is fortuitous - I am studying for my first AWS certification and just completed a dynamoDB lab the other night. However none of these subtleties you described were highlighted. Thanks for providing your insights. 👍
Good video, but I don’t quite understand how query lookup is O(1). How is that possible if we are searching the table for the matches to our query? Isn’t it based on the size of our table, so O(n) or larger?
It's because the database is sharded based on the partition key, so the data is grouped into partitions that are indexed by the partition keys. This means it's an O(1) hash lookup to get to the start of the partition. Also within a single partition items are indexed by the sort key, so if you also have that in your query it will be another O(1) lookup on top of the first. If you just have the partition key it will be O(partition size), which is probably still a lot smaller than your table size
Great video, dude! In my case, I'm using PK , but I have others 3 GSIs. The behavior is the same using GSI and his sort key comparing with PK + his sort key?
thanks in advance!
Hi Fabricio! The Sort key logic applies the same way to GSIs as it does to PKs. Hope this clarifies!
Great explanation! On Point!
Very nice video! Very educational. What if in my Customer Order table I have other fields like "Country" and "Product Type" and I want to filter, for example, "Tech" products bought in the "US". How will I query or fetch that data?
Is it possible to parallel query operation? Just like parallel scan operation
Hi Moneesh,
I don't know of any built-in method to do this beyond using multiple threads and firing off separate queries. There's a good article on this topic by AWS here: aws.amazon.com/blogs/database/use-parallelism-to-optimize-querying-large-amounts-of-data-in-amazon-dynamodb/
Hope this helps
@@BeABetterDev Thanks Man
Appreciated
Can you do operations like give me all customers with id greater than 1 on the partition key? Or are you limited to one value for the partition key for each query?
Nice video. Question: How should be format the datetime for using query with between? dd:mm:yyyy hh:mm:ss? Or do we need to separate date and time? Any suggestions about querying dt columns.
Personally, I convert DateTimes to Unix timestamps. 28:10:2021 20:00:00 => 1635447600. You can then query for values less than, greater than, or between the dates.
Great Video! But what if I want to return a list with all my primary keys which method should I use and how to use it?
Hi ! please did you find the answer of this question ? I'm also asking me this question
Super well done video
In my case i want to scan all data each time to compare with my response to know where update occur or insert and according to that i want to perform other requests...so what could be the best possible way?
put a modified/created timestamp in your data, and filter based on that
Is it additional cost when querying on GSI?
Wonderful video!!
I use query to get data, but it also limit 1mb data like you explain scan.
are RangeKey and sortkey same?
Yes
impeccable!!!
Thanks Hoddy!
awesome ❤
Do we need to Partition key all the times while querying (When I want to filter based on other normal keys)?
Cool.
You said when using query I need to know my pk, but what if I just want to list my data? Eg to do list, Will I have to use scan?