简体   繁体   English

AWS Aurora Postgres中的并行计划/查询

[英]Parallel plans/queries in AWS Aurora Postgres

By parallel, I mean distributing the workload of a single (analytical) query to multiple threads or even replicas. 并行地,我的意思是将单个 (分析性)查询的工作负载分配给多个线程甚至副本。

I see that OSS Postgres supports them since 9.6: https://www.postgresql.org/docs/9.6/static/parallel-plans.html 我看到OSS Postgres从9.6开始就支持它们: https : //www.postgresql.org/docs/9.6/static/parallel-plans.html

AWS Aurora has added preview of this, but only for the MySQL variant: https://aws.amazon.com/about-aws/whats-new/2018/02/amazon-aurora-parallel-query-is-available-for-preview/ AWS Aurora添加了此预览,但仅适用于MySQL变体: https : //aws.amazon.com/about-aws/whats-new/2018/02/amazon-aurora-parallel-query-is-available-for -预习/

But plain AWS RDS (not Aurora) does support them, by virtue of having Postgres 9.6: https://aws.amazon.com/blogs/database/performing-parallel-queries-and-phrase-searching-with-amazon-rds-for-postgresql-9-6-1/ 但是普通的AWS RDS(不是Aurora)确实支持它们,因为拥有Postgres 9.6: https : //aws.amazon.com/blogs/database/performing-parallel-queries-and-phrase-searching-with-amazon-rds -用于-的PostgreSQL-9-6-1 /

  1. Am I correct in inferring that AWS Aurora Postgres does not support parallel plan? 我在推断AWS极光的Postgres 支持并行策略是否正确?
  2. If so, does this mean that plain RDS Postgres may be more performant than the Aurora one for analytical queries? 如果是这样,这是否意味着普通的RDS Postgres在分析查询方面可能比Aurora更好。
  3. Any knowledge around future support of query parallelism for Aurora Postgres? 是否对Aurora Postgres的查询并行性的未来支持有任何了解?

Many thanks! 非常感谢!

Some explanations: 一些解释:

"parallel plans" in postgres9.6+ will do what you want: speed up a single query by kicking off parallel execution processes. postgres9.6 +中的“并行计划”将满足您的要求:通过启动并行执行过程来加快单个查询的速度。

Aurora "parallel query" for MySQL is something completely different, although it also results in what you want. MySQL的Aurora“并行查询”是完全不同的东西,尽管它也会产生您想要的东西。

Aurora (for MySQL and postgres) has a special distributed storage layer that keeps 6 redundant copies, which can be used for read-replicas and for failure recovery. Aurora(适用于MySQL和Postgres)具有一个特殊的分布式存储层,可保留6个冗余副本,可用于只读副本和故障恢复。 "parallel query" leverages this storage layer (which comprises storage with associated CPUs to manage the storage) to perform some query computation, off-loading the DB VM. “并行查询”利用此存储层(包括与相关CPU进行管理的存储)来执行一些查询计算,从而减轻了DB VM的负担。

For example, filtering out rows and cols not relevant to the query can be pushed down to the storage layer, instead of reading all the data back to the VM and discarding them there. 例如,可以过滤掉与查询不相关的行和列,而将它们下推到存储层,而不是将所有数据读回VM并在那里丢弃。

So in summary: 因此,总而言之:

"parallel plans" in postgres9.6+ creates parallel execution processes inside the VM postgres9.6 +中的“并行计划”在VM内部创建并行执行过程

"parallel query" in Aurora pushes down computation into the storage layer, offloading the VM. Aurora中的“并行查询”将计算推入存储层,从而减轻了VM的负担。

Answers to your Qs: 您的问题的答案:

  1. Correct 正确
  2. Maybe: see above. 也许:见上文。 Depends on the benefit you get by pushing down data filtering to the storage layer. 取决于将数据过滤下推到存储层所获得的收益。
  3. According to AWS blog, "parallel query" for postgres is under development: "We are launching with support for MySQL 5.6, and are working on support for MySQL 5.7 and PostgreSQL." 根据AWS博客的说法,针对postgres的“并行查询”正在开发中:“我们正在启动对MySQL 5.6的支持,并且正在致力于对MySQL 5.7和PostgreSQL的支持。” https://aws.amazon.com/blogs/aws/new-parallel-query-for-amazon-aurora/ https://aws.amazon.com/blogs/aws/new-parallel-query-for-amazon-aurora/

I think some "significant" boost to postgres for analytics is necessary to support "real-time operational analytics" on a transactional postgres system. 我认为对Postgres进行分析的“显着”提升对于支持事务Postgres系统上的“实时运营分析”是必要的。 "parallel plans" in 9.6+ is a start. 9.6+中的“并行计划”是一个开始。 Aurora "parallel query" is another, different approach. Aurora“并行查询”是另一种不同的方法。 There might be other approaches to speeding up analytics on postgres ... I'd like to see such solutions on multiple Clouds beyond AWS: Azure, GCP. 可能还有其他方法可以加快对postgres的分析速度...我想在AWS以外的多个云上看到这样的解决方案:Azure,GCP。

I have submitted a request for Azure - please upvote there if you agree: 我已经提交了有关Azure的请求-如果您同意,请在那里进行投票:

https://feedback.azure.com/forums/597976-azure-database-for-postgresql/suggestions/35794984-transactional-db-with-analytics https://feedback.azure.com/forums/597976-azure-database-for-postgresql/suggestions/35794984-transactional-db-with-analytics

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

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