相当于 AWS Athena 中的 WITH (NOLOCK)

Equivalent of WITH (NOLOCK) in AWS Athena

我试图在 AWS Athena 的 SQL 查询中使用“WITH (NOLOCK)”,但它似乎无法识别“NOLOCK”。它专门在 NOLOCK 上抛出错误。是否应该使用某种等效物?

非常感谢您的帮助!

这是我的查询: SELECT * FROM "usage_dw_large"."usage_sites" WITH (NOLOCK) limit 10;

这是错误: line 1:46: mismatched input 'with'. expecting: ',', '.', 'as', 'cross', 'except', 'for', 'full', 'group', 'having', 'inner', 'intersect', 'join', 'left', 'limit', 'natural', 'order', 'right', 'tablesample', 'union', 'where', <eof>, <identifier> (service: amazonathena; status code: 400; error code: invalidrequestexception; request id: 9aec79f3-9073-4adb-bff8-203fb617eb3e; proxy: null)

没有对应的。 AWS Athena 构建于 PrestoDB and here is an except from PrestoDB's docs:

Do not mistake the fact that Presto understands SQL with it providing the features of a standard database. Presto is not a general-purpose relational database. It is not a replacement for databases like MySQL, PostgreSQL or Oracle. Presto was not designed to handle Online Transaction Processing (OLTP). This is also true for many other databases designed and optimized for data warehousing or analytics.

没有像传统关系数据库那样的 row/table 锁,因此不包含或不需要此 keyword/feature。