News for hackers. Stuff that matters.
Re:Goodbye Microservices: From 100s of problem children to 1... by tabtab on Monday July 16, 2018 @06:37PM (#17545776)
One is going to need a way to debug and study ANY complex query for performance and bugs. EXPLAIN is a tool, not a crutch. "Dot-Chained" API's don't solve this by themselves. In bigger shops one typically has skilled DBA's who are good and quick at optimizing SQL anyhow because of their experience with it. An app-side programmer won't (or shouldn't) do this often enough to become a guru with query API optimization. Modern economies rely on specialization.
Re:Goodbye Microservices: From 100s of problem children to 1... by crimsonalucard on Monday July 16, 2018 @07:58PM (#17546194)
Read what I am writing. The fact that EXPLAIN is a tool means SQL is a crutch. No other language other than SQL needs this.
Re:Goodbye Microservices: From 100s of problem children to 1... by grzm on Monday July 16, 2018 @08:19PM (#17546293)
Ever profile an application? That's what EXPLAIN helps you with. SQL is different from a lot of languages in that it runs through query planner/executor, often based on properties of the actual data which change over time. Not a lot of other programs do this, and certainly not your typical imperative or procedural code. The JVM is one that comes to mind. Do you know of others?
Re:Goodbye Microservices: From 100s of problem children to 1... by crimsonalucard on Tuesday July 17, 2018 @01:09PM (#17551267)
I KNOW what it helps you with. No programming language has a keyword that decompiles expressions to their base components. Also profiling is only done when optimization is needed.

SQL on the otherhand... EXPLAIN is used on a regular basis, it's built in to the programming language and rather then just mark lines of code with execution time deltas it literally functions as a decompiler to deconstruct the query into another imperative language. This is the problem with SQL.

Re:Goodbye Microservices: From 100s of problem children to 1... by tabtab on Wednesday July 18, 2018 @02:59PM (#17561135)
Many application languages have "reflection" API's that can examine internal or low-level code structure. I used database languages such as dBASE (and clones) that are based on more or less on sequential query languages. While I did like more control over the intermediate steps, including the ability to analyze them; the problem is that different people do things too differently. SQL reigns in the "creativity" to a large extent. What works well for an individual may not scale to "team code". Working with a Picasso-coder's code can be a bear.
Re:Goodbye Microservices: From 100s of problem children to 1... by crimsonalucard on Thursday July 19, 2018 @01:50PM (#17568752)
This is a valid argument. A high level abstraction definitely serves as a restriction over code that gets to "creative" at the expense of obfuscation. Following this line of logic, the argument then truly does become apples to apples.