4 ms·
Spanner, CockroachDB and similar are really exciting, but the fact that none of them support stored procedures begs the question of whether it's inherently hard
by Diggsey 5y ago
Spanner, CockroachDB and similar are really exciting, but the fact that none of them support stored procedures begs the question of whether it's inherently hard/impossible to do so in a distributed database, or whether that just hasn't been a priority...
- teeohco 5y agoI worked at CRL. There's nothing about the architecture of CRDB that makes it hard or impossible. The company has bigger fish to fry with limited product and engineering hours.
- dalyons 5y agoWhy would they prioritize stored procedures ? They’re pretty much seen as an anti-pattern by most people today, outside of very niche use cases
- electrum 5y agoProcedures are very useful to enforce business logic in the database, rather than in the application. It’s like putting a higher level application-specific API on top of your database schema. For Cockroach, it could help substantially with latency for multi-statement transactions, since the procedure could be executed on a database node closest to the leaseholder for the data. Executing a multi-statement transaction on the client means incurring per-statement latency between the client and gateway node, and between the gateway node and the leaseholder.
- dboreham 5y agoIt's also a bad idea.
- Diggsey 5y ago> They’re pretty much seen as an anti-pattern by most people today That's a bold statement :)
- ddorian43 5y agoYugabyteDB does https://docs.yugabyte.com/latest/explore/ysql-language-features/stored-procedures/ https://docs.yugabyte.com/latest/explore/ysql-language-featu...