is Nested queries on DynamoDB efficient?
One of my developer team member is using LSI(Local secondary index) functions on DynamoDB to fetch a specific row.
Two or Three nested queries are executed each.
On RDB, we used to make this as a single query... It seems not efficient.. isn't it?
Is it normal and I/O execute time is efficient on DynamoDB?
I wonder we are using dynamoDB correctly,,that
To fetch a row, using multiple queries before to get LSI or GSI...
amazon-dynamodb
add a comment |
One of my developer team member is using LSI(Local secondary index) functions on DynamoDB to fetch a specific row.
Two or Three nested queries are executed each.
On RDB, we used to make this as a single query... It seems not efficient.. isn't it?
Is it normal and I/O execute time is efficient on DynamoDB?
I wonder we are using dynamoDB correctly,,that
To fetch a row, using multiple queries before to get LSI or GSI...
amazon-dynamodb
What’s your metric for efficiency? It’s hard to tell you which is more efficient when we don’t have a clear measurement of efficiency. It would also make it easier to provide help if you could include more information about your data model and current table schema.
– Matthew Pope
Nov 15 '18 at 17:04
there are several LSI and GSI in a table. and the goal of Query is similar to RDB, which has where by statement.
– dipt
Nov 19 '18 at 10:17
To get the a row, we added a another id filed and several queries (2 or 3) are executed. as the I/O time is getting higher then it degrade performance, doesn't it? if the final data as a query result is multiple rows then I understand we can use GSI. but to get only single row, I think it is over spec.... and length of each data is very short. (not a document) Don't you think this is over-spec and fit-able for RDB?
– dipt
Nov 19 '18 at 10:23
You can use DynamoDB for pretty much anything, but it requires knowing your query patterns ahead of time so you can model your data the right way. If you don’t need the scalability and availability of DynamoDB, and you want to be able to run large number of different queries, then you probably would find a SQL database to be much more efficient. If you need the scalability that DynamoDB provides, then you should consider DynamoDB with either CloudSearch or ElasticSearch for queries.
– Matthew Pope
Nov 19 '18 at 18:07
I can’t really be any more specific without knowing your table structure and the queries you’re executing.
– Matthew Pope
Nov 19 '18 at 18:08
add a comment |
One of my developer team member is using LSI(Local secondary index) functions on DynamoDB to fetch a specific row.
Two or Three nested queries are executed each.
On RDB, we used to make this as a single query... It seems not efficient.. isn't it?
Is it normal and I/O execute time is efficient on DynamoDB?
I wonder we are using dynamoDB correctly,,that
To fetch a row, using multiple queries before to get LSI or GSI...
amazon-dynamodb
One of my developer team member is using LSI(Local secondary index) functions on DynamoDB to fetch a specific row.
Two or Three nested queries are executed each.
On RDB, we used to make this as a single query... It seems not efficient.. isn't it?
Is it normal and I/O execute time is efficient on DynamoDB?
I wonder we are using dynamoDB correctly,,that
To fetch a row, using multiple queries before to get LSI or GSI...
amazon-dynamodb
amazon-dynamodb
asked Nov 11 '18 at 23:58
dipt
176312
176312
What’s your metric for efficiency? It’s hard to tell you which is more efficient when we don’t have a clear measurement of efficiency. It would also make it easier to provide help if you could include more information about your data model and current table schema.
– Matthew Pope
Nov 15 '18 at 17:04
there are several LSI and GSI in a table. and the goal of Query is similar to RDB, which has where by statement.
– dipt
Nov 19 '18 at 10:17
To get the a row, we added a another id filed and several queries (2 or 3) are executed. as the I/O time is getting higher then it degrade performance, doesn't it? if the final data as a query result is multiple rows then I understand we can use GSI. but to get only single row, I think it is over spec.... and length of each data is very short. (not a document) Don't you think this is over-spec and fit-able for RDB?
– dipt
Nov 19 '18 at 10:23
You can use DynamoDB for pretty much anything, but it requires knowing your query patterns ahead of time so you can model your data the right way. If you don’t need the scalability and availability of DynamoDB, and you want to be able to run large number of different queries, then you probably would find a SQL database to be much more efficient. If you need the scalability that DynamoDB provides, then you should consider DynamoDB with either CloudSearch or ElasticSearch for queries.
– Matthew Pope
Nov 19 '18 at 18:07
I can’t really be any more specific without knowing your table structure and the queries you’re executing.
– Matthew Pope
Nov 19 '18 at 18:08
add a comment |
What’s your metric for efficiency? It’s hard to tell you which is more efficient when we don’t have a clear measurement of efficiency. It would also make it easier to provide help if you could include more information about your data model and current table schema.
– Matthew Pope
Nov 15 '18 at 17:04
there are several LSI and GSI in a table. and the goal of Query is similar to RDB, which has where by statement.
– dipt
Nov 19 '18 at 10:17
To get the a row, we added a another id filed and several queries (2 or 3) are executed. as the I/O time is getting higher then it degrade performance, doesn't it? if the final data as a query result is multiple rows then I understand we can use GSI. but to get only single row, I think it is over spec.... and length of each data is very short. (not a document) Don't you think this is over-spec and fit-able for RDB?
– dipt
Nov 19 '18 at 10:23
You can use DynamoDB for pretty much anything, but it requires knowing your query patterns ahead of time so you can model your data the right way. If you don’t need the scalability and availability of DynamoDB, and you want to be able to run large number of different queries, then you probably would find a SQL database to be much more efficient. If you need the scalability that DynamoDB provides, then you should consider DynamoDB with either CloudSearch or ElasticSearch for queries.
– Matthew Pope
Nov 19 '18 at 18:07
I can’t really be any more specific without knowing your table structure and the queries you’re executing.
– Matthew Pope
Nov 19 '18 at 18:08
What’s your metric for efficiency? It’s hard to tell you which is more efficient when we don’t have a clear measurement of efficiency. It would also make it easier to provide help if you could include more information about your data model and current table schema.
– Matthew Pope
Nov 15 '18 at 17:04
What’s your metric for efficiency? It’s hard to tell you which is more efficient when we don’t have a clear measurement of efficiency. It would also make it easier to provide help if you could include more information about your data model and current table schema.
– Matthew Pope
Nov 15 '18 at 17:04
there are several LSI and GSI in a table. and the goal of Query is similar to RDB, which has where by statement.
– dipt
Nov 19 '18 at 10:17
there are several LSI and GSI in a table. and the goal of Query is similar to RDB, which has where by statement.
– dipt
Nov 19 '18 at 10:17
To get the a row, we added a another id filed and several queries (2 or 3) are executed. as the I/O time is getting higher then it degrade performance, doesn't it? if the final data as a query result is multiple rows then I understand we can use GSI. but to get only single row, I think it is over spec.... and length of each data is very short. (not a document) Don't you think this is over-spec and fit-able for RDB?
– dipt
Nov 19 '18 at 10:23
To get the a row, we added a another id filed and several queries (2 or 3) are executed. as the I/O time is getting higher then it degrade performance, doesn't it? if the final data as a query result is multiple rows then I understand we can use GSI. but to get only single row, I think it is over spec.... and length of each data is very short. (not a document) Don't you think this is over-spec and fit-able for RDB?
– dipt
Nov 19 '18 at 10:23
You can use DynamoDB for pretty much anything, but it requires knowing your query patterns ahead of time so you can model your data the right way. If you don’t need the scalability and availability of DynamoDB, and you want to be able to run large number of different queries, then you probably would find a SQL database to be much more efficient. If you need the scalability that DynamoDB provides, then you should consider DynamoDB with either CloudSearch or ElasticSearch for queries.
– Matthew Pope
Nov 19 '18 at 18:07
You can use DynamoDB for pretty much anything, but it requires knowing your query patterns ahead of time so you can model your data the right way. If you don’t need the scalability and availability of DynamoDB, and you want to be able to run large number of different queries, then you probably would find a SQL database to be much more efficient. If you need the scalability that DynamoDB provides, then you should consider DynamoDB with either CloudSearch or ElasticSearch for queries.
– Matthew Pope
Nov 19 '18 at 18:07
I can’t really be any more specific without knowing your table structure and the queries you’re executing.
– Matthew Pope
Nov 19 '18 at 18:08
I can’t really be any more specific without knowing your table structure and the queries you’re executing.
– Matthew Pope
Nov 19 '18 at 18:08
add a comment |
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53254455%2fis-nested-queries-on-dynamodb-efficient%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53254455%2fis-nested-queries-on-dynamodb-efficient%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What’s your metric for efficiency? It’s hard to tell you which is more efficient when we don’t have a clear measurement of efficiency. It would also make it easier to provide help if you could include more information about your data model and current table schema.
– Matthew Pope
Nov 15 '18 at 17:04
there are several LSI and GSI in a table. and the goal of Query is similar to RDB, which has where by statement.
– dipt
Nov 19 '18 at 10:17
To get the a row, we added a another id filed and several queries (2 or 3) are executed. as the I/O time is getting higher then it degrade performance, doesn't it? if the final data as a query result is multiple rows then I understand we can use GSI. but to get only single row, I think it is over spec.... and length of each data is very short. (not a document) Don't you think this is over-spec and fit-able for RDB?
– dipt
Nov 19 '18 at 10:23
You can use DynamoDB for pretty much anything, but it requires knowing your query patterns ahead of time so you can model your data the right way. If you don’t need the scalability and availability of DynamoDB, and you want to be able to run large number of different queries, then you probably would find a SQL database to be much more efficient. If you need the scalability that DynamoDB provides, then you should consider DynamoDB with either CloudSearch or ElasticSearch for queries.
– Matthew Pope
Nov 19 '18 at 18:07
I can’t really be any more specific without knowing your table structure and the queries you’re executing.
– Matthew Pope
Nov 19 '18 at 18:08