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 個月前檢視次數 758 次
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 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南