gpt4 book ai didi

amazon-web-services - IN PartiQL 运算符是否查询或扫描 DynamoDB 表?

转载 作者:行者123 更新时间:2023-12-05 03:24:55 25 4
gpt4 key购买 nike

我们需要查询一个大型 (2TB+) DynamoDB 表以根据分区键获取多个项目。

我们计划使用 PartiQL,因为它支持 IN 运算符:

SELECT * FROM table_test where pk IN ('1234','1112');

此查询会在后台执行 DynamoDB 查询操作还是 DynamoDB 扫描操作?

我们希望避免表扫描,因为它们更昂贵。

最佳答案

Would this query do DynamoDB query operations or DynamoDB scan operations under the hood?

它将执行多个 DynamoDB 查询,因为您的 WHERE 子句条件语句正在 DynamoDB 分区键 上进行过滤。

这是根据 documentation 确认的:

To ensure that a SELECT statement does not result in a full table scan, the WHERE clause condition must specify a partition key. Use the equality or IN operator.

关于amazon-web-services - IN PartiQL 运算符是否查询或扫描 DynamoDB 表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72153151/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com