Live data from Hacker News

How Microsoft brought SQL Server to Linux

techcrunch.com

181–190 of 207 posts

Re: How Microsoft brought SQL Server to Linux

#181
post #176

Earlier quoted context omitted.

He said that they "originally developed for MS SQL." and then "Later we added in support for Postgres/MySQL." Sounds like they develop a product that can use multiple RDBMS back-ends. Also, I'm guessing that since 90% of the businesses out there use Microsoft products, you would probably want to support their products in such a venture. On a personal note, I find anything that's not SQL Server to be tedious to work w…

honest question, when would you query several tables without joining them somewhere? you can do that on postgres as well btw, my first idea would be to create a function [1] and just throw the rows together. still can't imagine a usecase for that though, i'd always want to get them separately if they're unrelated. you're correct on the GUI side however. Everything i've tried is a buggy mess. i've actually mostly give…

The databases I build exist only to serve the application and I prefer to tightly couple the data access to the database itself, thereby addressing the object/relational impedance mismatch in one simple stroke.

I usually write queries that return multiple resultsets when the caller needs to get a bunch of data from different tables all at once. (So, all of the time.) Instead of sending each table query to the database server individually, I just query one "stored procedure" in SQL Server. It saves a lot of round-trips on the network and there are other benefits too.

For instance, say my API needs to take the relational data from tables `Customer, Order, OrderItem(s) and OrderShipment(s)` and return them as a JSON object `{order:{customer: {...}, items: [...], shipments: [...]}}`. Or, say I need to render a PDF using those same tables. In either case the client needs to get a whole graph of data out of the database and with SQL Server, they can only send one little query to call my procedure: `EXEC dbo.GetCustomerWithOrderDetail @OrderId=999;` instead of sending 4 or 5 single-resultset queries.

Sometimes I do also end up sending 2 or 3 procedure queries separately, for instance the client might send a query for `GetCustomerWithOrderDetail` followed by `GetPdfTemplateWithDetailForRendering`. So, I get code encapsulation too.

The benefits of this style are exponential in my opinion. Most of the time, my client apps don't even need to know the names of the tables because they are calling procedures, not embedding "SELECT * FROM TABLE" in the client code. The only minor drawback is that the client does need to know the order that the resultsets are returned in ahead of time.

I think there are a few ways to attempt this in PG but none of them seem to come very highly recommended. I looked around just now and found this post:

https://stackoverflow.com/questions/36717138/postgres-functi...

You can see the programmer wants to do what they need to in a very simple way, similar to how it would be done in SQL Server. However, it's not possible. Here is an article that explores some of the options in PG and the problems with each approach:

https://blog.dsl-platform.com/multiple-result-sets-alternati...

Re: How Microsoft brought SQL Server to Linux

#182
post #151

Earlier quoted context omitted.

>Also, Linux doesn't mind running from HDD. Not ten years ago, not now. That's factually incorrect. OSX, Windows, Linux, it makes no difference. You cannot hide the 8ms of response time that comes with a crappy laptop spinning drive. If you spend all your time in a web browser with ample amounts of memory... sure. If you're doing ANYTHING that requires disk I/O - whether it be launching a game, or opening a large dir…

Guess what, Linux distros figured out how to sprint read everything that is needed into RAM and boot under 10 seconds. Windows takes more than a minute on better hardware by seeking the hell out of it.

Is there any Linux dist, even a minimal one, that out-boots windows? TIL.

On my SSD, my Win10 cold boots faster than my Dell U2410 screen displays anything if powered at the same time (couple of secs)

Re: How Microsoft brought SQL Server to Linux

#183

Earlier quoted context omitted.

I didn't understand the question here (the /s was lost on me because I'm slow probably)

If you say that a product that is forced upon me by an automatic upgrade just needs better hardware than what I had before, then that hardware upgrade should also happen automatically, or at least for free. Additionally, you don't get to compare two products if one of them has massively higher hardware requirements.

Oh - updates. Right.

Completely agree that having a major version bump as an automatic is insane.

That's why they should just skip the version numbering and just make it a subscription. Then they can sunset hardware 5-6 years old continuously like iOS, but let people choose to stay on the of version indefinitely.

Re: How Microsoft brought SQL Server to Linux

#184
post #179

Earlier quoted context omitted.

I don't want or need windows server and certainly don't want to pay for cals for my users. However, I'm very happy with sql server and will pay for that running on Linux . My middleware is go and I can cross compile it to Linux from my mac. I would have no code to rewrite to make it happen

Honest question: won't SQL Server on Linux require CALs as well?

Yes. I was saying I didn't want to pay for windows server and any cals I would need for my users, I'm perfectly fine with paying for sql server cals. Just not windows server cals.

Re: How Microsoft brought SQL Server to Linux

#185

Earlier quoted context omitted.

I feel I have to counter this. I have seen similar problems on multiple different machines. I know they are not "my" problems. I've been a Windows user and supporter for decades but my experience in the past 5 years is that it unfortunately doesn't "just work" these days. Also: your recommendation for resolving reliability issues is to reinstall the OS? Yes I know the historical reasons for saying this, but in 2017 i…

i am not recommending reinstall the OS. its so 90s. He/She said slow boot and freeze with "fresh factory install". Clearly having some issues. I am also a technician and installed win10 more than i can count. Yes Old & Slow and New Budget-friendly machines are problematic with windows 10. Thats mainly because hardware. Because its new OS and getting better hardware is a must. You cant complain about a calculator can…

And what more features do I get? Everything I do today on a computer I could do in 1995.

Re: How Microsoft brought SQL Server to Linux

#186
post #176

Earlier quoted context omitted.

honest question, when would you query several tables without joining them somewhere? you can do that on postgres as well btw, my first idea would be to create a function [1] and just throw the rows together. still can't imagine a usecase for that though, i'd always want to get them separately if they're unrelated. you're correct on the GUI side however. Everything i've tried is a buggy mess. i've actually mostly give…

The databases I build exist only to serve the application and I prefer to tightly couple the data access to the database itself, thereby addressing the object/relational impedance mismatch in one simple stroke. I usually write queries that return multiple resultsets when the caller needs to get a bunch of data from different tables all at once. (So, all of the time.) Instead of sending each table query to the databas…

Interesting. I worked on a larger project that used Oracle and a similar approach. The maintainers of PG actually advocate for this abstraction as well (maybe not the multiple responses, not familiar with that aspect) but most developers and frameworks ignore it.

Re: How Microsoft brought SQL Server to Linux

#187

Earlier quoted context omitted.

Curious why have postgres and SQL server?

He said that they "originally developed for MS SQL." and then "Later we added in support for Postgres/MySQL." Sounds like they develop a product that can use multiple RDBMS back-ends. Also, I'm guessing that since 90% of the businesses out there use Microsoft products, you would probably want to support their products in such a venture. On a personal note, I find anything that's not SQL Server to be tedious to work w…

> For instance - did you know that Postgres can't easily return multiple resultsets?

Looks like it can, just not as easily: https://github.com/docevaad/Chain/wiki/Multiple-Result-Sets-...

Re: How Microsoft brought SQL Server to Linux

#188
post #176

Earlier quoted context omitted.

He said that they "originally developed for MS SQL." and then "Later we added in support for Postgres/MySQL." Sounds like they develop a product that can use multiple RDBMS back-ends. Also, I'm guessing that since 90% of the businesses out there use Microsoft products, you would probably want to support their products in such a venture. On a personal note, I find anything that's not SQL Server to be tedious to work w…

honest question, when would you query several tables without joining them somewhere? you can do that on postgres as well btw, my first idea would be to create a function [1] and just throw the rows together. still can't imagine a usecase for that though, i'd always want to get them separately if they're unrelated. you're correct on the GUI side however. Everything i've tried is a buggy mess. i've actually mostly give…

> honest question, when would you query several tables without joining them somewhere?

You might be "joining" client side if you had something like a master/detail UI. Network round trips are relatively slow and to be avoided if you can (n+1 errors being the pathological case):

https://people.eecs.berkeley.edu/~rcs/research/interactive_l...

Re: How Microsoft brought SQL Server to Linux

#189
post #150

Earlier quoted context omitted.

Too bad that Windows 10 barely usable on itself. Every application looks different (yes they used to blame Linux/X11 on that one). It has two control panels (or three maybe), two web browsers shipped with it. Takes more than a minute to boot on a new and pretty formidable laptop. This is the fresh factory install. Can freeze the desktop while apparently doing something under the hood (installing updates? scanning mal…

>Every application looks different (yes they used to blame Linux/X11 on that one). It has two control panels (or three maybe), two web browsers shipped with it. So you want your cake and you want to eat it too? It's pretty well known that as part of the new iterative release cycle they're slowly moving things into the new "control panel". That's not going to happen overnight, and unless you want to go back to only se…

> and unless you want to go back to only seeing new releases every 4+ years

I was fine with that, I like my desktop to just be there and get out of the way, not something that has to impress me with shiny new features constantly. Even the ported apps aren't consistent though, look at the mail app and the hideous background image they put in it.

> I've never had windows "Freeze the desktop for 5 minutes at a time".

I certainly have on an intermittent internet connection, the start menu can freeze for several minutes. That isn't good enough for a basic OS feature that shouldn't even have an internet connection. On the same connection it can also take several minutes to login to login to the machine because it's tied to the MS account.

Re: How Microsoft brought SQL Server to Linux

#190
post #151

Earlier quoted context omitted.

> Such as it having a mechanical disk. it's almost a complete no go with win 10 Why then do Windows 10 laptops get sold with HDDs? You come to store and that's what you get out of it. Also, Linux doesn't mind running from HDD. Not ten years ago, not now. Lesson to MS: Get your act together or get out of this business. Come back from make-believe world. MS is running on make-believe for the last 10 years. Windows 8, t…

>Also, Linux doesn't mind running from HDD. Not ten years ago, not now. That's factually incorrect. OSX, Windows, Linux, it makes no difference. You cannot hide the 8ms of response time that comes with a crappy laptop spinning drive. If you spend all your time in a web browser with ample amounts of memory... sure. If you're doing ANYTHING that requires disk I/O - whether it be launching a game, or opening a large dir…

> That's factually incorrect. OSX, Windows, Linux, it makes no difference. You cannot hide the 8ms of response time that comes with a crappy laptop spinning drive.

Sure you can, you can load stuff in memory so you don't have to hit the hard drive every time you do something like open the start menu. Once in a while the taskbar likes to "refresh" itself and the icons disappear while the drive spins up. It's not a problem I ever had on windows 7 or any linux machine.

Post reply on HN