Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel queries #111

Closed
GTANAdam opened this issue May 24, 2020 · 3 comments
Closed

Parallel queries #111

GTANAdam opened this issue May 24, 2020 · 3 comments

Comments

@GTANAdam
Copy link

Hello,
Has there been any implementations leveraging Go's concurrency capabilities?
I'm quite sure it wouldn't be hard to implement read-only parallel queries with sync.mutexes if it hasn't been done yet

@timsehn
Copy link
Sponsor Contributor

timsehn commented May 25, 2020 via email

@zachmu
Copy link
Member

zachmu commented May 25, 2020

This is already possible, but hasn't been tested to our satisfaction yet. We could help in this effort if you have a use case that requires parallel execution.

When constructing an engine, use the WithParallelism method on the AnalyzerBuilder:

https://github.com/liquidata-inc/go-mysql-server/blob/master/sql/analyzer/analyzer.go#L51

It parallelizes on partitions, so if your data source can be partitioned it should be possible to run each query in parallel on each partition (up to some max) simultaneously. But like I said: we don't have full faith in the implementation yet, and could use help proving it works.

@zachmu
Copy link
Member

zachmu commented Sep 10, 2020

We now have a convincing proof of concept that parallel execution works in dolt. Let us know if you try it out and find any issues.

@zachmu zachmu closed this as completed Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants