
Executing Parallel Statements to Improve Performance - nvanbenschoten
https://www.cockroachlabs.com/blog/parallel-sql-statements/
======
whileoneloop
If you’re inventing new syntax... Wouldn’t an a async/await be more useful -
to declaratively indicate the desired dependencies between simultaneously
operating statements? That way you can work with the results of an inserted PK
or the row count to inform later statements - when needed. Eg. ‘returning
async’

~~~
andreimatei1
I believe this suggestion came up at the time. I think we didn't do anything
like it because it would have been more complicated both to implement and to
describe, and because it's not particularly common for people to use/need the
values that can be returned by the statements that we can parallelize. The
future, though, is long and open.

------
irfansharif
The accompanying RFC, Parallel SQL Statement Execution:
[https://github.com/cockroachdb/cockroach/blob/0da3da734ce6bf...](https://github.com/cockroachdb/cockroach/blob/0da3da734ce6bfdf55f31b973130c3f58c8a1c7c/docs/RFCS/20170124_sql_parallelization.md)

------
carterehsmith
"CockroachDB maintains strong consistency across a globally-distributed
cluster of computers."

No, CockroachDB does not maintain strong consistency across a globally-
distributed cluster of computers. It is a "goal", but not the reality.

People reviewed these claims, and they do not hold (see e.g. Aphyr's review)

~~~
andreimatei1
Why do you say that they don't hold, exactly? We take our consistency
guarantees, and correctness more generally, deadly serious. I think it's fair
to say that we did quite well on Aphyr's review; he's found some quite obscure
issues that were quickly fixed. More details here:
[https://www.cockroachlabs.com/blog/cockroachdb-beta-
passes-j...](https://www.cockroachlabs.com/blog/cockroachdb-beta-passes-
jepsen-testing/)

~~~
carterehsmith
"We take our consistency guarantees, and correctness more generally, deadly
serious"

That is empty talk, ie advertising.

In a distributed database, as is the state of the art, you sacrifice one of:
availability, consistency, performance.

This is true for every db, be it Spanner, or MongoDb.

Best to document what exactly was sacrificed. Just claiming that you "take it
seriously" means nothing. BTW good luck :)

~~~
manigandham
Is that your own spin on the CAP theorem? Where does "performance" even come
into the equation?

And CRDB is a CP system, just like Spanner.

------
capkutay
This seems to be a trend that I see across open source projects. They blog
about features that Oracle has had for 25 years as if it's something new. Can
someone enlighten me as to why there's interest around X DB's implementation
of something that's been built dozens of times before?

~~~
endymi0n
With all due respect, Oracle doesn't provide ACID semantics across a cluster
spanning several continents...

~~~
lgas
Isn't that exactly what "Extended Distance Oracle RAC Clusters" provide?

~~~
danielmg
No. That still uses ASM. It's effectively low level IO mirroring and needs
fast data-centre interconnects and low-latency.

I work a lot with RAC and it introduces more problems than it solves tbh.

