Athena federated query to Timestream slow

0

We connected Timestream to Athena using the Athena Timestream connector. When running a federated query through Athena to Timestream, performance is 7x slower than querying Timestream directly. Simple, sub-second queries in Timestream take a minimum of 7 seconds to return in Athena. Is there anyway to improve Athena's federated query performance? We could connect directly to Timestream's JDBC driver, but it would require additional work and won't allow joining across AWS products through Athena, like we had hoped to do.

In a similar vein, is it possible to use Glue to connect Timestream to Athena more directly? Or is the federated query connection still required even if using Glue?

Drew
已提问 4 个月前755 查看次数
2 回答
0

Rearranging the tables in the join to better align with the WHERE clause can often result in a more efficient query plan, significantly reducing the runtime. Using Athena's EXPLAIN feature can help you identify inefficiencies in your query's execution plan. For example, making sure the join operations are performed in the correct order can have a substantial impact on performance. A suboptimal join order may result in unnecessary data processing and longer execution times.

https://aws.amazon.com/blogs/big-data/optimize-federated-query-performance-using-explain-and-explain-analyze-in-amazon-athena/

Additional metadata from AWS Glue Data Catalog may be used to optimize queries; AWS Glue database and table names must match those in Timestream; lowercase names are preferred for optimal performance; mixed case names result in more computationally intensive searches; setting AWS Glue table properties in accordance with Timestream requirements can also improve performance.

https://docs.aws.amazon.com/athena/latest/ug/connectors-timestream.html

https://docs.amazonaws.cn/en_us/athena/latest/ug/connectors-timestream.html

profile picture
专家
已回答 4 个月前
0

Appreciate the response. No joins are being used here, this is just a straight query to Timestream with a simple predicate that matches the timestream db.

We will integrate into Glue as well and see if that helps improve performance.

Drew
已回答 4 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则