There seems to be about a hundred ways of retrieving items in dynamo db. I have heard that Querying is only for Hash and Range Key values, however the, I have also seen that scanning is very slow and expensive on memory for my read and write units. However, some of the code and articles I've read are outdated, I am unsure where to go from here.
I need some help determining which is the most efficient way to find entries in the following ways.
Currently all my data is contained on one table "User_Table", I have "username" as my hash key, but do not use a Range Key, the items I'm trying to load should be around 30-50kb each
Scenario #1 Search for accounts with 2 attributes between 2 values each
I want to find nearby users locations so I can add them to a GoogleMap on the home screen, so I need to search dynamodb for my users with a "latitude" value between A and B, also a "longitude" value between C and D.
Scenario #2 Search by Hash Key
A user wants to search for others by username
Scenario #3 searching for a specific non hash key value (string)
My app allows users to add for example a Twitter account to their profile, no other profiles are allowed to have the same Twitter account linked, so I would just need to search and find the user containing a "twitter" value of "billymitchell" etc
QUERYING
querying has these different options
dynamoDBMapper.query(), dynamoDBMapper.queryPage()
amazonDynamoDBClient.query(), amazonDynamoDBClient.getItem(), amazonDynamoDBClient.batchGetItem()
SCANNING
scanning seems to have the following options
dynamoDBMapper.scan(), dynamoDBMapper.scanPage(), dynamoDBMapper.parallelScan()
amazonDynamoDBClient.scan()
I only have a few a entries in my DynamoDB Table currently, so I don't have a clear view of how well things will scale if my app starts to gain thousands of requests at a time, also . I know that adding more read and write units can get expensive very quick. Can anyone point me in the right direction?
Thanks!
Firebase Cloud Functions: PubSub, "res.on is not a function"
TypeError: Cannot read properties of undefined (reading 'createMessageComponentCollector')
The Snackbar covers the control buttons of the Google Pixel deviceThe device is running Nougat and the screenshot illustrates the issue:
This question already has an answer here:
I want to excute an executable on boot On a target board with Android 51 so I add this in init
I'm looking for a solution of low quality photos in android emulators like Genymotion, NOX, Bluestacks or other) on WindowsThe task is to get application work perfectly, which makes photo text documents and sends them to Internet for text recognition...