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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인