简体   繁体   English

Redshift 中并行查询的执行时间随着查询数量的增加而急剧增加

[英]The execution time of parallel queries in Redshift increases drastically with the no of queries

I am new to Amazon Redshift.我是 Amazon Redshift 的新手。 I have preloaded some data to a table and I am testing the query latency in Redshift.我已将一些数据预加载到表中,并且正在测试 Redshift 中的查询延迟。 The fact that I have observed is that with parallel queries the execution time is going up highly as the no of queries fired parallely increases.我观察到的事实是,对于并行查询,执行时间随着并行触发的查询数量的增加而大幅增加。 The Redshift documentation points to the use of sort key and I have tried all that and the situation still remains the same. Redshift 文档指出了排序键的使用,我已经尝试了所有这些,但情况仍然保持不变。 Kindly help me out in improving the parallel query execution time in Redshift.请帮助我改善 Redshift 中的并行查询执行时间。

It sounds like you are just issuing more queries and not changing the queue definitions, right?听起来您只是发出更多查询而不更改队列定义,对吗?

Redshift uses a queuing system to manage the influx of queries called WLM (WorkLoad Manager). Redshift 使用排队系统来管理称为 WLM(工作负载管理器)的大量查询。 The WLM is configurable and limits the number of queries that are actually executed in parallel vs. held waiting in the queues. WLM 是可配置的,并限制实际并行执行的查询数量与队列中等待的数量。 So the first question I'd want to look at is how much of the observed latency is due to "queue wait" time.所以我想看看的第一个问题是观察到的延迟有多少是由于“排队等待”时间造成的。

Now just increasing how many queries can execute in parallel is not going to fix the latency in many cases.现在,在许多情况下,仅仅增加可以并行执行的查询数量并不能解决延迟问题。 Redshift can typically execute between 1 and 2 dozen queries at a time depending on the complexity of your queries. Redshift 通常一次可以执行 1 到 2 打查询,具体取决于查询的复杂性。 Allowing too many queries to execute at the same time can drastically reduce the total performance of the cluster.允许同时执行太多查询会大大降低集群的总体性能。 Most people have a mix of large and small queries and properly configuring the WLM can improve query latency by allowing simple and high priority queries to be executed quickly while big batch queries queue up.大多数人混合使用大小查询,正确配置 WLM 可以通过允许在大批量查询排队时快速执行简单和高优先级的查询来改善查询延迟。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM