10 ms·
Urban Myths about SQL (2015)
- saintfiends 11y agoIt's not SQL that is slow, but when you try and distribute a relational database you lose Referential integrity, Transactions, Unique Indexes and other such key features which are why you actually chose a relational database in the first place. I'm yet to see a database which does all of that and still is truly distributed.
- jhugg 11y agoVoltDB lets you keep transactions, and the strong consistency lets you enforce many constraints (though some in stored procedure code). Cluster-wide uniqueness has some limitations, but there are lots of tools we offer that are way better than nothing. Much of what you get in a relational DB, you can keep, and you can scale.
- eterm 11y agoI sometimes wonder if the "cloud first" mentality has led people to distributing databases way way before the need for it. I get that "big data" is in the in thing right now, but non-distributed databases still scale to huge amounts of data. I suspect there are plenty of services running over distributed servers instead of a couple of appropriately sized principal/witness servers. Beyond that, it's better to distribute by splitting databases across services or uses, so instead of having a mono-database running over a cluster, it's better for example to have an OLTP database and a separate OLAP database for reporting. It's easy to split those out to different servers rather than having a mono-database distributed over a cluster. Going beyond that, data partitioning is more sane, so you partition the data so that different sets of non-interacting data are in different places. So you can for example partition by customer, then each of those partitions can be arranged to different servers where appropriate for load. There shouldn't be a need to have transactions hitting more than one partition at once when partitioned correctly. And none of that breaks referential integrity.
- jhugg 11y agoWell, even for smaller use cases, systems with peer-to-peer clustering over a lan have better high-availability profiles than primary/secondary replication systems.
- merb 11y ago"Use stored procedures instead" - in most use cases this is prolly a really really bad idea.
- matwood 11y ago> "Use stored procedures instead" - in most use cases this is prolly a really really bad idea. Of course, so when I need need to do operations on large sets of data lets pull it all into an app, operate on the data and then push it back. I would not be no snarky if I had not seen it done because someone didn't like stored procedures.
- zzzeek 11y agoThose aren't the only two choices.
- copperx 11y agoWhy is that?
- koolba 11y ago> "Use stored procedures instead" - in most use cases this is prolly a really really bad idea. This is a common recommendation. The basis for it is two fold, 1) You strictly define the inputs for your transaction as the parameters for the stored proc and 2) You have a single round trip from the app to the DB. For a complex transaction involving says 10 separate operations (insert X, query Y, update Z, ...) that's 10 network roundtrips that are saved. Add to that eliminating the transit of data from the DB to the app server.
- jhugg 11y agoI’m pretty sure this is Mike’s GlueCon 2010 presentation verbatim. Not sure why it says 2015. Plenty has changed since 2010 about VoltDB. If people have any questions I’m happy to answer.
- Kesty 11y agoThis seems suspiciously like a marketing presentation for VoltDB more than debunking myth about SQL. Tl;Dr; SQL is too slow ? No, VoltDB is Fast !
- jhugg 11y agoIt was presented in 2010 at gluecon and was the launch deck for VoltDB. A big chuck is marketing, yes. Doesn’t make it wrong as a counterexample. Though in 2016, there are a lot more fast SQL systems and it’s unclear this myth is still as mythical as it was?
- mangeletti 11y agoI agree. This is basically marketing material from VoltDB. I've flagged it, not because it's not interesting (some of it is), but because marketing propaganda can't really be trusted as a source of information.
- BenoitP 11y agoWhile it is clearly propaganda for VoltDB, it does a good job of adressing some of the myths of SQL-slowness that we don't see very often. Usually a lot of people saying SQL is slow is because they don't really use it well. He doesn't talk about indexing and statistics [1] for example. But he talks about ODBC/JDBC because, while it is usually fast enough, a lot of people overlook the fact that these interfaces hold transactions externally. Besides, the presentations comes from Stonebreaker himself; of (Turing prize, Von Neumann Medal, ingres, postgres, cstore, vertica, hstore, SciDB, Tamr, Streambase)-fame. [1] http://use-the-index-luke.com/ http://use-the-index-luke.com/ is a very good resource for this.
- jasode 11y agoYes, that slide deck in isolation looks an ad so it's probably better to get some background on Michael Stonebraker's "big picture" beliefs and core premises: ++ He believes SQL is the "right" and most proven access model. (Note that SQL does not mean RDBMS like Oracle/MSSQL.) ++ He believes in ACID ++ He believes that other db engines' (NoSQL, etc) approaches to gain speed and scaling of clusters by sacrificing SQL and ACID is wrong and his proof is that those other products end up eventually bolting on SQL and ACID anyway. I think a better presentation to flesh out these ideas is the following youtube video: https://www.youtube.com/watch?v=KRcecxdGxvQ https://www.youtube.com/watch?v=KRcecxdGxvQ It's 55 minutes long so to save time, HN readers may prefer to browse it by pressing "L" key to step through it quickly. Just read the slides shown behind him and if the bullet points look interesting, rewind and listen to his presentation. One can dwell on those SQL/ACID merits in isolation and consider separately, the question of whether VoltDB-as-a-product fulfills those ideals.