访问雅典娜中正在更新的表 [英] Accessing tables being updated in Athena

查看:51
本文介绍了访问雅典娜中正在更新的表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在发布 msck修复表语句时,在udpate期间仍然可以访问该表以进行查询吗?

When issuing the msck repair table statement, is the table still accessible for querying during the udpate?

我之所以问是因为,我正在尝试为相对较大的S3配置单元表(用于在QuickSight中生成某些报告)找出最佳的更新时间表.发出此命令是否会破坏同时运行基于此表的QuickSight报表的任何人?

I ask because I'm trying to figure out the best update schedule for a relatively large S3 hive table that is used to drive some reports in QuickSight. Will issuing this command break anyone who happens to simultaneously be running a QuickSight report based on this table?

推荐答案

是的,当您运行 MSCK REPAIR TABLE 时,该表可用于运行查询,这是一个后台进程.但是,在该命令运行时运行的查询将看到不同的分区,因为命令发现的分区将在找到时添加.

Yes, the table will be available for running queries while you are running MSCK REPAIR TABLE, it's a background process. Queries run while that command is running will see different partitions, though, as the partitions the command discovers will be added as they are found.

请注意,运行 MSCK REPAIR TABLE 是一个非常低效的过程,由于存在许多分区,因此它将运行很长时间,并且不是增量的.这与查询性能无关紧要,但是如果现在花很长时间,它将只会花费越来越长的时间,并且可能不是可行的长期策略.关于StackOverflow,这里还有其他一些问题,您可以阅读这些问题,以找到其他使表保持最新状态的策略.

Be aware that running MSCK REPAIR TABLE is a very inefficient process, with many partitions it will run for a very long time, and it is not incremental. This doesn't matter for query performance, but if it takes a long time now, it will only ever take longer and longer and might not be a viable long term strategy. There are some other questions here on StackOverflow about it that you can read to find other strategies for keeping your tables up to date.

这篇关于访问雅典娜中正在更新的表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆