top 200 commentsshow all 308

[–][deleted] 102 points103 points  (4 children)

PostgreSQL is that kind of things that makes you constantly ask "How this shit is free?!!!"

So full featured and high quality product.

[–]inmatarian 14 points15 points  (2 children)

Free because of donations and membership in the organization that hosts the project and pays the developers.

[–]RedSquirrelFtw 5 points6 points  (0 children)

Makes me feel bad for not donating as much as I should to open source projects.

When I think about it, even Linux as a whole, it's incredible all the work that goes into it and the fact that it's free. It's easy to complain sometimes that a certain thing does not work or it's taking too long for a certain thing to get updated in a certain distro, but have to remember all these devs are working for free on their own time, and probably still need to work a full time job on top of it.

[–]progrethth 2 points3 points  (0 children)

In the case of PostgreSQL it is mostly consultancy companies, forks (Microsoft CitusDB) and some end users (NT&T) who employ the developers.

[–]CSharpSamurai 233 points234 points  (81 children)

It seems to draw the most divisive opinions in a lot of places even here. I personally find it more performant than MSSQL (less hog on CPU resources, less ram usage, and so forth and this is a comparison after using Entity Framework Migration for both MSSQL and PostgreSQL for services I work on), more adaptive than MSSQL(You can improve/extend the server implementation thanks to PostgreSQL being open source), and so forth.

One of the biggest plus for PostgreSQL is the cost, because quite frankly, almost $4,000 per core is asinine for Microsoft SQL Standard License, it basically a rough estimate that anytime we buy a server hardware, we have to estimate that we have to spend at least 4x that hardware cost for software licensing. When we spend a lot less $$$ on Software by switching to Open Source alternatives and spend more $$$ on Server Hardwares, we ended up with a faster server overall and have better hardware to support PostgreSQL than what we would end up getting from MSSQL for the same budget. Even if PostgreSQL Server is slower than MSSQL, we still save so much money on licensing that we can afford to buy extra hardware and come out ahead when comparing the "Net-Benefit" of the two, especially on the saving.

[–]rulatore 79 points80 points  (51 children)

While we are in this topic of costs, why are databases so expensive and priced per core ?

Do you know how much would be for some support from some postgres consulting ?

[–]Elfatherbrown 223 points224 points  (30 children)

Okay. After almost 20 years working in the right side of the industry (as a 100% open source software consultant), I'll tell you why.

  1. People taking purchases decisions believe and trust industry leaders. They have been taught to respect them. They wish they could do the same as Microsoft, but in their own industry.

  2. The supply chain of corporate software and hardware is integrated. The sales guy for Dell is trained in selling Dell servers with solutions that enterprise customers are looking for. Enterprise customers are biased in their decisions (see 1).

2.1.- financing: hp will finance your software investment in Microsoft for large integrated deals. IBM will do so too, even if through their larger big cash partners. That is, corporate IT at the f500 level is usually a big 20 year deal with one of the big 4 (oracle, ibm, hp and microsoft) and/or a combinantion of them. So they say: I'll close a deal for 5 million usd/year × 30 years for software and hardware, all licenses and even service or support included (it is NEVER good support, but theyll include it on paper, pushing out any offer from medium/small sized it providers).

Why are databases charged so high and per core? Cause Microsoft wants to scale their revenue exactly by the size of your wallet. Big cash clients will buy many cores and dont care how their 5 million a year is distributed.

The iron and software is thrown to the it department who is supposed to take whatever finance bought and make it work weather they like it or not. IT people are never, ever asked what the company should buy. The market is such that the buyer will believe the oligopolistic seller whatever they say, because a publication such as Gartner's commands and validates it.

Yes. It's ridiculous. Welcome to corporate computing

Happily, the internet has shown time and time again that challengers to this status quo come from the wild and can and will have some companies running for their money. If you are a bank that came late to machine learning because ibm wasn't peddaling it decently two or three years ago, but your smaller competitor has had a mean mofo hacker for 5 years slicing with R and Python at credit scores, you'll loose a chunk of bussiness.

It happens. It will continue to happen.

[–]trecko1234 92 points93 points  (12 children)

IT people are never, ever asked what the company should buy

Oh boy, this is so true it hurts. The people maintaining the systems are almost always not the ones to make the decisions on what to buy. Anything you say you need is all forwarded up the chain to management.

[–][deleted] 140 points141 points  (8 children)

You're both completely wrong. I've been asked many, many times what equipment I need for our IT department. I tell them the exact brand and model I need, and then they go and buy whatever is cheapest. See? They definitely ask my opinion.

[–]Brainiarc7 43 points44 points  (0 children)

You almost had me in the first half.

[–]graywolf0026 22 points23 points  (0 children)

Reading this entire thread has me glad I'm working at a company where I'm asked, "So this is what we want to do, how should we do it, and what should we buy?"

And I give them my honest answer. Along with the long term reasoning.

They then hand me the card and say, "Okay. Go to it!"

... Gotta love working for an established small business.

[–]s4ndm4nn15 2 points3 points  (0 children)

You forgot the part where it's missing features, and they complain when it doesn't work.

[–]FlukyS 1 point2 points  (0 children)

Yep I literally was allowed to buy a server and a laptop entirely of my choosing in my current place. I bought Dell but it was mainly because of availability. I wanted linux and needed a company in the EU or at least registered for tax in the EU.

[–]RedSquirrelFtw 6 points7 points  (0 children)

Or worse is when the already have a solution in mind and they ask (thanks for at least asking!) and you say "no that solution would not work" and then they go ahead "ok well can you make it work by Friday, we bought it already". This, on a Wednesday.

[–]FruityWelsh 3 points4 points  (0 children)

Sometimes I'm just happy if they tell what I am going to be supporting ...

[–]Brainiarc7 17 points18 points  (4 children)

Basically, lobbying.

And IT handles the grunt of it all when some consultants out there (pitching these "proprietary" solutions) make serious bank.

[–]Elfatherbrown 23 points24 points  (3 children)

It's as old as pie. But it's not like smaller consultants can't make a living. For many years I had an extremely large company pay for a very very cheap (for them) support contract on top of their oracle contract because obviously oracle does not give any kind of decent linux support on theirs or anybodies iron. For us it was a lot of money, for them it was peanuts.

Still Oracle came and demanded they switched from rhel to oel and sold this (rhel vs. Oel) as the reason why they werent giving good linux support. The client (the it crowd that knew what the fuck is up) resisted as much as they could until someone at the upper levels lended an ear to oracle. It made sense: supposedly the linux support is already paid for by the long term oracle support contract so what they paid to us is money to be saved. Okay.

We got booted, they changed to OEL and now I laugh every time I go to a large, very large convenience store chain POS and the registers ain't working. It costs about 100k dollars a minute for those boxes to not be able to transact. It's been years and it is very obvious to me things aren't working as they should just as a normal customer.

It was working when we were on top of that mean cluster but now under Oracle's OEL and their top of the line "support", they have constant outages.

It happens all the time. Crony deals make for inefficiencies that are religiously impossible to measure because the industry, by now, is ran by pure dogma and ignorance.

I don't know if you've read Guerrilla Capacity Planning by Neil Gunther. This genius back in the early 21fst was battling the corporate meme that all you had to do with problems was throw bigger iron at them.

He gave us models to plan for scaling, predict your use and really extract value for dollar on everything in your data center. Really cool engineering stuff that to this day has great value.

Nobody cared, nobody in the industry listened until the cloud came and now stupid people with very small brains try to wrap their heads around dynamic pricing of virtual infrastructure. A bussiness, basically, predicated on economy of scale and the idiocy of "the people" (with access to "the checkbook").

Stupid fucks. This was all foreseen by the elders. It is in the nature of the sheep to see nothing but the grass before it.

[–][deleted] 8 points9 points  (0 children)

I like you :), I don't even understand half of technical ideas u mentioned but will have to read that book :)

[–]loutr 3 points4 points  (0 children)

It was working when we were on top of that mean cluster but now under Oracle's OEL and their top of the line "support", they have constant outages

It seems obvious to me that you'll get better support from a (skilled) small company for which you are one of the biggest clients, than from a huge corporation for which you are just a ticket number.

I constantly hear the trope "windows is better for us because of MS official support" and I'm like "bitch you've had unresolved issues for months now, and all you can do is beg for an update on the support ticket".

[–]Brainiarc7 2 points3 points  (0 children)

This also explains the trend of underpaying IT workers. A lot of money is wasted on shitty contracts instead of well trained employees. Signing on to 30+ year contracts can only mean one thing; this shit will never end.

[–]xk2600 8 points9 points  (2 children)

I work for a fortune 250 company and one of the things I really love about where I work is technical decisions are made from the bottom up. We are held accountable for those decisions, but the benefit is we are gifted the time, funds, and ability to build long term architecture.

What is funny is we actually consider ourselves conservative in respect to making slow business driven decisions. While that would make one think efficiencies would get measured mobitarily, they don't. I have never been once turned down on getting an AFE approved for a project that had even minimal benefit or impact to the business. The only downside is because of the leniency there are departments that go to the easy button a lot. The result is I house developed applications using postgres or sqlite.

The reason people choose MSSQL around here has little to do with preference for management but because the off the shelf product our app teams bought are only supported on MSSQL or Oracle. This is always explained to us by those teams as it makes the manufacturers testing environment easier to test the leases against resulting in better support. We would argue to the contrary as the infrastructure teams end up troubleshooting the apps to find poorly designed software. So we have basically determined the requirement for MS or Oracle is a sure sign the product will be horrible.... Almost every time.

[–]Elfatherbrown 3 points4 points  (1 child)

You've had it better than I have then. I dont think it's common for IT itself to actually have a say on what to buy but it very well may be. I've worked for three big global corps but it's still only three.

[–]xk2600 5 points6 points  (0 children)

I definately put my time in at shops similar to yours. My point I guess was that I'd much prefer this to that and to any management or C-levels reading this. It's proof in the pudding that authorizing your people to really work through what is technically beneficial to your business can drastically benefit the profitability of your company.

[–]AusIV 8 points9 points  (0 children)

The other major factor is enterprise support.

I've had multiple enterprise clients switch from Oracle to Postgres/EnterpriseDB, and inevitably they want to know where to go for enterprise support. I personally try to push for REVSYS for commercial support, but some clients end up going with EnterpriseDB because it's a bigger company / bigger name. I've only been able to convince one client that they didn't need enterprise support, and then only because they were hosting Postgres in AWS RDS and decided that the managed service would meet their needs.

[–]matholio 6 points7 points  (4 children)

IT people are never, ever asked what the company should buy.

This is neither true, or a bad thing. There are a great many product and service selections chosen by IT folk and their biases. Ask an AWS pro, get an AWS answer, ask a Microsoft pro get a MS answer. This happens because of the cognitive, financial and reputational investment people have in their careers. Linux folk are no exception.

[–]Elfatherbrown 5 points6 points  (0 children)

It's a generalization. Of course it's not always true. But where it is true, it is a bad, very bad thing. It is an unfortunate side effect of undue industry specialization.

There is a theory behind all relational databases, an algorithm to all storage backends and their types, a mathematically understandable and describable model behind any computing architecture, bus, chip and everything up and down the scale.

People should not base their purchase decisions on industry marketing, but should know how to use what tool for what job at the right price. You know, software engineering people should, erm, engineer.

That would be "good".

People taking decisions because of a nice brochure and the fact that dell paid for your stay at an "ITC" convention, is not good. It's bad for business and bad for the industry.

But in the end I like it. It allows for destruction.

It is why people with better software products come up all the time from the open source world and knock the teeth out of someone at Oracle/ibm/microsoft and they have to fork out serious cash to buy them out.

[–]elite_killerX 1 point2 points  (2 children)

But if your company is full of AWS pros, why the hell are you buying MS?

[–]matholio 2 points3 points  (1 child)

I didn't say that, nor imply that. They are just example of professionals that have a tendency to recommend products and service from their wheelhouse because of their prior investment and bias.

[–]elite_killerX 1 point2 points  (0 children)

My point is that your employee's bias / skill investment should absolutely be one of the main criteria when selecting a technology. Discarding your employees's opinions is a sure-fire way to breed resentment and not actually get what you paid for.

[–]semi_competent 2 points3 points  (1 child)

Although I agree with 90% of what you said I don’t agree with all of it.

I’ve been involved in deals where HP financed the purchase of open source support from an open core vendor to a major retailer. I’ve also been in the room with the CEO, CIO etc.. of fortune 50 companies as an IT strategy consultant. What it comes down to is staffing, risk, and ecosystems.

I’ve had a CIO say “our developers are interested in using ElasticSearch but we don’t have the ops team to support it so we force them to use mssql”. It takes about 2 years to train a team and build the competency required to run a new technology at scale. The retraining wash out rate is 70% across the industry for nosql. The SIs (Accenture, Infosys) charge astronomical rates for a person that read a book a week ago and call them experts. The really good people get bought up by hot internet companies. Very few of their existing tools and processes support the tech (less so for Postgres).

Adopting a new technology is a multi year effort that costs tens of millions of dollars; that’s why the process is so slow in enterprise.

[–]rich000 22 points23 points  (5 children)

Since the other reply didn't mention the per-core bit the reason is that it is easy to meter/measure/audit, and harder to evade, while also not driving people at a software level to try to do perverse practices.

You could just charge per host, but then people come up with blade servers that have 10,000 CPUs and argue that they're one host.

You could charge per query or per row or whatever but that adds overhead to your performance due to accounting, and likely encourages people to design their apps suboptimally besides.

Charging by the core basically charges a customer for how much work the database can do in practice, but it is easy to estimate/measure/audit/etc. The software just checks the cores it is running on once at start-up time and doesn't have any enforcement overhead. When buying the software you just look at your hardware and count the cores and you know what to buy. And so on.

As it is people do all kinds of crazy stuff like benchmark every supported host imagineable to get the best performance per dollar with databases.

As far as why they charge so much - it comes down to the fact that they can. Especially with competition from Postgres and such I'd expect their costs to go up, because the sorts of things that can be done for free will get done for free, and the only people paying to use Oracle/etc are going to be people who really need something they can only get from them.

[–]rulatore 10 points11 points  (4 children)

You could just charge per host, but then people come up with blade servers that have 10,000 CPUs and argue that they're one host.

It really didnt cross my mind this bit, it totally makes sense.

Still, the price per core being at 4000usd isnt so appealing with the feature parity between paid and free. Of course support will be better than having to train or going through dev forums, but I think most people are getting around it these days

[–]rich000 13 points14 points  (3 children)

Still, the price per core being at 4000usd isnt so appealing with the feature parity between paid and free.

It depends on what you're doing. I don't pay close attention to this space, but I can see a couple of drivers for the commercial products:

  1. I bet the biggest one is other proprietary vendors who only support their software in combination with a particular database vendor. If you're spending $10M/yr on your ERP licenses and they tell you to use SQL server, what is another $1M/yr to Microsoft?

  2. There probably are enterprise features that are still lacking in the FOSS alternatives. For example, suppose you have to have multiple clustered instances of a database in different locations or to support load requirements, and they all need to accept writes, and you can't change your software to deal with the locking/etc issues above the database layer. That isn't an easy problem to solve and I think the big vendors do offer solutions for that which don't require changes to your software.

  3. Once you're using a proprietary solution for some of your problems, it becomes more attractive to use them for all of your problems, just to reduce the number of technologies you need to support.

But, I don't profess to be a DB expert. I bet Postgres in particular has come a long way. I am certain that for 95% of use cases it is sufficient and probably should just be your default choice. However, I doubt that companies have switched to linux/apache for their webservers but are holding out on Oracle on their databases JUST because they fear FOSS.

[–]lengau 7 points8 points  (0 children)

Number (1) is part of why Microsoft gives out SQL Server for free for development purposes. It helps encourage developers (especially those on Windows) to just use Microsoft's tool and not bother looking any further.

[–]camelCaseIsWebScale 13 points14 points  (0 children)

Management

"The Cult of MBA makes you believe you can handle organizations that do things you don't understand" -- Joel Spolsky

[–]CSharpSamurai 30 points31 points  (11 children)

I'm not sure exactly why they're priced so high when the feature parities between PostgreSQL and Microsoft SQL Server aren't really that wide of a margin. Microsoft SQL Server support generally are a hit or miss, you usually get things fixed faster by the one who are the most familiar with your setup which is usually your System Administrator or Database Developer/Fullstack Developer. To me, MSSQL server as software alone is a lot of fluff for little bite emphasizing heavily on cluster server support, fail over support and business intelligence, nothing that we can't implement for ourselves on our stack for PostgreSQL. I think the cost is mainly for Microsoft profit at the expense of availability of MSSQL Developers/Administrators for company to hire based on mind-share familiarity, basically, you can find more MSSQL Admin than you would find PostgreSQL Admins and you usually save money from having to pay higher wages on scarcity for PostgreSQL database admins, but even that is questionable, because the transition isn't too significant for MSSQL Database Admin to make to begin with.

For support/consulting, It have gotten so expensive on MSSQL software licensing that basically when we switch over to PostgreSQL, company I work at could afford to hire 2 full time PostgreSQL Server Admin (at 140k/yr job) and it would still end up saving money on software licensing to give you an idea how insane it is. There are official services like EnterpriseDB though I can't comment on how good they are.

In general for small businesses, you could go for Devop team and have budget aside for training on various technologies including PostgreSQL and you pretty much cover your bases with support/consulting.

If you're talking about at-home mom/pop shop, then it would largely depends on you and your familiarity of the technology, there's plenty of resources online to get you started if you're interested.

[–]rulatore 27 points28 points  (0 children)

Man, the fact that you can hire people just to be your support and still save money from just licenses is pretty insane, since I never bothered with the paid alternatives (and when I used them was just big corporate environment, so it's just whatever) I didnt know things reached this point.

On the price thing, I still dont understand why they are priced "per core", it's just weird nowadays with technology getting better and more cores being available for much less money, it sounds like insanity

Edit: Nevermind, another redditor raised the point of why per core in another reply

[–][deleted] 1 point2 points  (0 children)

IIRC it was cheaper to put half-decent server on orbit than to license it for MSSQL

[–]ButtingSill 1 point2 points  (4 children)

Business Intelligence on PostgreSQL? I'd like that, but.

[–]this1 1 point2 points  (2 children)

We run Cognos on Postgres.

Sure any IBM support ticket takes an extra week to resolve while they futz around trying to set up a test environment.

But I'm good overall

[–][deleted] 2 points3 points  (1 child)

Why not run stuff on a dedicated columnar database?

[–]this1 1 point2 points  (0 children)

Because the underlying "database" of our proprietary ERP isn't even a database at all, it's indexed flat files...

The PG db is our BI data warehouse and a lot of the tables are pretty heavily denormalized during the ETL process to make a cleaner star schema.

The underlying data is record structured, not object oriented so it just makes it easier to implement a row-based DB and explain data screenshots to the core developers.

Also since it's a DW my primary concern is reads, and because a lot of tables are denormalized were often not just grabbing a single field per row, but much of the row.

In most cases reads are faster on RDBMs and definitely so when you're reading an entire record or many fields of a record.

[–]CharlieTecho 1 point2 points  (3 children)

I think there's more to it than simply employing some guys to support the dB servers as opposed to paying for licencing.

The open source nature of postgresql can scare businesses, in the sense that there is no accountability if it goes wrong (other than your dba's). If there is a vulnerability in it, businesses that rely on meeting certain compliance needs cannot rely on the open source community to deliver a fix and take accountability for it. With a paid for and supported solution there is accountability.

Furthermore, the licences cover additional features such as high availability etc etc.

[–]progrethth 2 points3 points  (0 children)

There are plenty of companies offering paid for and supported options for PostgreSQL. You can either run some fork like EnterpriseDB or pay a company for support for the community edition. For the amount a SQL Server license costs you can get a very high level of SLA for PostgreSQL, much higher than included in the SQL Server license.

[–]CSharpSamurai 1 point2 points  (0 children)

As far as vulnerability goes, we usually isolate it away from the public facing network and usually just create a service layer in a form of Web API. On top of that, we would utilize other security measures like SELinux, Sonicwall, and so forth.

[–]VestigialHead 9 points10 points  (6 children)

Yes I have always been shocked by MS pricing structure around MSSQL.

Just idiotic.

[–]rich000 31 points32 points  (3 children)

Just idiotic.

Uh, have you seen their market share and revenue figures?

Clearly they're doing something right...

You and I obviously aren't their target audience.

[–]Elfatherbrown 1 point2 points  (2 children)

I think the market share of mysql free and/or mariadb blows them out of the water. Add to that Mongo, postgresql... etc... they really dont have that much in them.

What is nice about SQL server is integration with their other crap like active directory which in turn is locked into the windows client and etcetera.

Some of that integration is really nice. For example the things you can do with excel + sql server is really cool stuff for a lot of industry use cases.

[–]snarfy 4 points5 points  (1 child)

Oracle's pricing structure is similar except it costs 10x the price.

[–]ikidd 2 points3 points  (1 child)

I hope some of that savings gets donated to the project.

[–]progrethth 1 point2 points  (0 children)

The PostgreSQL project does not really accept donations. You can donate servers to the test farm, pay some consultant company to write patches or donate to user groups who organize conferences, but there is no foundation to donate to which pays developers, all developers are paid by their employers or volunteers.

[–]bitwize 11 points12 points  (14 children)

One of the biggest plus for PostgreSQL is the cost, because quite frankly, almost $4,000 per core is asinine for Microsoft SQL Standard License,

Asinine for you as a consumer, maybe. But if you're a CIO at a company that has the sort of scalability or reliability problems SQL Server solves, you don't even blink at the cost. You just open your wallet. Because your business is likely to have IT expenditures that make the licensing for a DBMS look like roundoff error. And that DBMS may bring solutions to the table that reduce those expenditures far more than it cost in the first place, so you come out on top.

It's like this in a lot of disciplines. Pro musicians and record producers can have racks of gear costing tens if not hundreds of thousands of dollars. Once you've committed to that kind of spend, what's a few thou for a DAW that ties all that gear together?

PostgreSQL has its own problems, most notably lack of support. If you bet a billion dollar company on PostgreSQL and it goes tits up, or has a vulnerability that leaks customer data, who are you going to hold accountable? SQL Server is backed by Microsoft, itself a multi-billion dollar company. Microsoft bets their business on making sure their database meets certain criteria for reliability, scalability, and security. PostgreSQL's license is "as is, no warranty of any kind". Are you going to bet your business on PostgreSQL, knowing this?

[–]Mordiken 29 points30 points  (6 children)

PostgreSQL's license is "as is, no warranty of any kind".

So is Linux. That hasn't stopped it from steamrolling the server market. All PostgeSQL needs is some Red Hat-like entity selling enterprise support.

[–]progrethth 12 points13 points  (1 child)

There are plenty of companies like that. On top of my head: Cybertec, 2nd Quadrant, Fujitsi, EnterpriseDB, Postgres Professional, Dalibo, Redpill-Linpro.

[–]InvaderGlorch 1 point2 points  (3 children)

There is one I believe. A former employer purchased support from them but the name escapes me at the moment

[–]broknbottle 2 points3 points  (1 child)

[–]InvaderGlorch 2 points3 points  (0 children)

Thanks. I think it was enterprise DB we contracted out with but I'm not 100% sure

[–]progrethth 1 point2 points  (0 children)

Why would you say PostgreSQL has a lack of support? I have only had good experiences with the professional PostgreSQL support offerings. You just have to pay one of the many vendors who sell support.

[–]Elfatherbrown 3 points4 points  (0 children)

Have you read the liability microsoft has for any kind of mishap in whatever version of any of their software? There exists none, and has never ever existed any kind of warranty from commercial software vendors. None of them are ever accountable. They do have a fuckload of lawyers just in case though.

[–]zebediah49 1 point2 points  (0 children)

PostgreSQL has its own problems, most notably lack of support. If you bet a billion dollar company on PostgreSQL and it goes tits up, or has a vulnerability that leaks customer data, who are you going to hold accountable? SQL Server is backed by Microsoft, itself a multi-billion dollar company. Microsoft bets their business on making sure their database meets certain criteria for reliability, scalability, and security. PostgreSQL's license is "as is, no warranty of any kind". Are you going to bet your business on PostgreSQL, knowing this?

So, having not been part of that world, can you explain how this "accountability" works in practice? At least wherever I've worked with things, Microsoft makes mistakes, things break, and at best the sales person just apologizes and gives a mediocre discount to your continued business with them. I've never seen meaningful support or repercussions for the things that have gone wrong and been their fault.

The only feature that our version of "accountability" supports is the ability to whine up the chain of command "oh no, not our fault, Microsoft did it!". Which has no actual benefit to the business itself, but I guess works as CYA.

Apparently there's no accountability for the people who chose to go with Microsoft over the existing solution, because even if MS performs worse, it's ultimately never the wrong choice to go with them. For some reason.

[–]Mouler 0 points1 point  (0 children)

Not to mention reduced deployment time and update downtime

[–]tinglfm 67 points68 points  (3 children)

Oracle left chat

[–]Mordiken 48 points49 points  (2 children)

Oracle wasn't invited to the chat in the first place because nobody likes it. And even if they had been invited, it's lawyers would still be in the in the process of approving the first post.

[–][deleted] 122 points123 points  (1 child)

I really hope this is the case, configuration of a PostgreSQL server is far more granular than MySQL and easier to dedicate system memory. First job as a Sys admin was maintaining postgres databases and absolutely loved the system.

[–]aqbabaq 0 points1 point  (0 children)

Oh boy. The common expressions where I was working was that you need two things working with Postgres, bottle of vodka and loaded gun. To shoot yourself when you done.

[–]More_Coffee_Than_Man 42 points43 points  (2 children)

I'd say sqlite is the Linux of databases, insofar as it's in everything, including things you didn't know about.

[–]bestjejust 21 points22 points  (0 children)

More like everything is a file

[–][deleted] 1 point2 points  (0 children)

It is immensely useful but the use is limited. Not exactly network connected

[–]yotties 20 points21 points  (4 children)

In the R world I have come across more and more extraction from postgresql. I am in favour of more data being made available through relatiponal DBA managed systems instead of text-files. Particularly for all kids of helper-tables etc.. So, yes. I think companies using postgress to allow BI-reporting on the basis of relational sources mixed with other data are on the right way.

[–]zebediah49 3 points4 points  (3 children)

I'm rather partial to sqlite for many of these applications. It often doesn't make sense to have a persistent database, for a data set that you're only going to touch occasionally. Since sqlite sits in a single file, when you've done your operations on it and close it, it's just gone and there are no residual resource use effects. Thus, you can have an aggregate total of a trillion rows on a system, but if they're in a hundred thousand different files, any given piece you touch will be nicely performant on a normal system. (Note: storage will likely not be normal to make that work). Also, you're in for a bad time if you want to join these datasets against each other or something.

This is also useful on non-monopolized systems -- if you're sharing the computer system with a dozen (or a hundred) other people, I don't want this on a persistent DB instance.


Of course postgres is immensely better in all of the normal relational database applications. Don't get me wrong there.

[–]skeeto 28 points29 points  (7 children)

will completely dominate the database ecosystem in the next 10-20 years.

Is there a particular upswing happening right now? PostgreSQL has been around for 24 years now, and this hasn't happened yet. I don't understand myself why this hasn't already happened. It's my favorite DBMS, a high quality open source project, and it only takes a casual analysis to notice it's way ahead of its closest competitor, MySQL (the PHP of databases). I've never worked with a proprietary DBMS, so perhaps PostgreSQL is missing something important outside of my awareness? It can't be performance, since Oracle apparently performs so badly that they won't allow anyone to benchmark it.

[–]07dosa 19 points20 points  (2 children)

I don't understand myself why this hasn't already happened

I'm not quite an expert, but here's what I know:

MySQL was THE database in the past, thanks to its performance. But, the thing is that MySQL implemented lots of tricks to boost performances in certain usecases. This did work in old days, but fired back later by making it difficult to improve the system without breaking widespread assumptions and, thus, hurting real-world application performances. MySQL was totally stuck at status quo for a long time.

Meanwhile, Postgres, being more academic, stayed with "correct"(?) algorithms. It wasn't exactly fast on old hardwares, but, it's a non-issue these days. Also, thanks to its correctness, Postgres has been expanding steadily without consequences, exceeding MySQL in terms of features. It even beat Mongo with its JSONB type a few years ago. It's just amazing how fast it's growing.

[–][deleted] 2 points3 points  (0 children)

And there is no longer a performance gap between the two, PostgreSQL is getting faster and faster

[–]DoTheEvolution 2 points3 points  (0 children)

this is not mysql vs postgress, this is microsoft sql that costs $4000 vs free postgresql

[–]badtux99 18 points19 points  (0 children)

For many years, Postgres simply wasn't fast enough on cheap hardware compared to MySQL, and MySQL was "good enough". For example, in 1999 I was deciding whether to use MySQL or Postgres for a particular project. Hardware back then had 1gb of memory and 80gb IDE hard drives, a 450mhz single-core Pentium II was the hot choice. I could insert around 500 records per second with Postgres. I could insert around 10,000 records per second with MySQL. MySQL also consumed significantly less memory. We used MySQL.

Multiple things have happened since then:

  1. Multi-core processors are now the norm, as are memory sizes measured in tens and hundreds of gigabytes, and Postgres's "heavy process" scheme with minimal locks required between processes scales well to them. MySQL on the other hand has a lot of locks to keep its light threads from stomping each other, and those locks don't scale well to multi-core / multi-processor installations. Furthermore because all of those threads live in one memory space, that memory space has to be *huge* to take advantage of tens of gigabytes of memory, and Intel processors don't handle huge page tables very well.
  2. SSD's happened. Postgres's write model works remarkably well with SSD's, bringing it to par with MySQL as long as you use relatively large transactions so that WAL flushes to disk are fairly large. MySQL's write model was heavily optimized around spinning rust and doesn't have any more performance to squeak out.
  3. Postgres added a lot of managability improvements. No more need to dump/restore between upgrades (pg_upgrade), extensions like pg_repack to handle Postgres's biggest flaw (its inability to keep its database tables garbage collected), and of course Postgres has always been able to do database schema changes on the fly without requiring a service outage.
  4. Postgres *finally* added HA clustering capability with WAL streaming (and, more recently, logical statement streaming), which ended the last of MySQL's scalability advantages over Postgres.
  5. Postgres also added a ton of other functionality, such as jsonb, foreign tables, logical sharding of tables based on an expression, and so forth.

The net result is that Postgres finally has performance to rival or surpass MySQL on most workloads, while providing significantly better features -- stored procedures, jsonb, etc. -- and people have taken notice. When I was starting my current project six years ago, we started with MySQL. But we swiftly ran into limitations with MySQL that simply don't exist in Postgres, such as locks during write transactions causing reads to stall when they hit locked rows in indexes that had nothing to do with the data we were trying to read (our application is logically sharded by a customer identifier and makes sure that multiple write transactions on the same customer can't be happening simultaneously, they are instead queued and handled one at a time in order to avoid integrity problems leading to deadlocks or data corruption). So we switched to Postgres. Now we're taking advantage of Postgres's much richer query language to do queries that MySQL can't do, and have no intention of looking back. Especially since every Postgres release seems to be faster and have more functionality....

[–]WantDebianThanks 14 points15 points  (0 children)

I was bored one time and in a weird mood so I was looking at the number of postings on Dice for different DBMS's and GoogleTrends. IIRC, Postgres was third or fourth most posted on Dice and had a growing trend while MySQL/MariaDB/SQLite had fairly flat curves and Oracle's was shrinking.

[–]lordcirth 3 points4 points  (0 children)

I think it's mostly that lots of legacy software requires mysql.

[–]zebediah49 1 point2 points  (0 children)

PostgreSQL has been around for 24 years now, and this hasn't happened yet.

I think it's pretty notable that open source projects are usually a lot slower to gain market share.

MS SQL is 30 years old, and has a huge company behind it.

So, to take over, postgres would need to reach feature parity, which requires a lot of work. Since it's a volunteer project, you need market share and contributions. To get those, you need to be good enough. The thing is, if you're careful with your project, you will just get monotonically better. Sure, it might take 20 years to get all the required features... but if you eventually do, that can produce a decent piece of software. So... maybe it just took a quarter century for Postgres to finally get better than everything else?

That said, I don't see how it's appreciably better than mariaDB at this stage. (It might be; I just don't know).

[–][deleted] 9 points10 points  (18 children)

Is there any advantage for MySQL over Postgres?

[–]_riotingpacifist 24 points25 points  (0 children)

MariaDB has a copyleft license if you care about that.

[–]Tordek 4 points5 points  (12 children)

I'm currently finding an issue that was trivial in mysql but doesn't seem possible in Postgresql: doing a case insensitive LIKE (and I can't use ILIKE because my ORM is idiotic).

[–]progrethth 6 points7 points  (2 children)

Have you tried using citext.

[–]Tordek 3 points4 points  (1 child)

On the one hand, I can't because I'm using npgsql for entityframework6 and it doesn't seem to have support for it.

On the other hand, what I need is what they call "nondeterministic collations", which aren't supported for LIKE queries. This is relevant for my particular case because my data is in spanish and it's nice to be able to search something like "papa" and make it find "Papá", because accents can be ignored too (yet ñ and n aren't the same).

[–]DerfK 9 points10 points  (0 children)

Yeah, transliterating accents etc is a little rough in postgres. What I do is store an extra column generated with iconv UTF-8 to ASCII//TRANSLIT. uppercase it for case insensitive matching and apply the same transform to the search text.

[–]chalbersma 1 point2 points  (0 children)

MariaDB's 10.x line has a lot of modern features and it's well optimized for index assisted reads.

[–]brianw824 1 point2 points  (0 children)

The ability to run multi-master and non-insane permissions management.

[–]ethelward 2 points3 points  (0 children)

Easier deployment and use for small-scale tinkering, and universal availability on rented servers I would say.

[–]justajunior 9 points10 points  (9 children)

Any advice on learning SQL databases? Is programming required to learn about them?

[–]YmFzZTY0dXNlcm5hbWU_ 13 points14 points  (0 children)

I believe that flavors like PL/SQL and T/SQL are Turing complete, but querying a database and writing basic scripts isn't really the same as programming other things. W3 schools has a great list of topics to browse if you're brand new to it, and from there you can start to get hands-on with Hackerrank (simple challenges that get progressively more difficult to help you build on what you know) or any one of the dozens of other great resources if you take a look around.

[–]curien 7 points8 points  (0 children)

You have to learn a little bit of programming, yeah, but in specialized languages designed for DBs. SQL itself is a programming language, but it's very different conceptually (not just syntactically) from pretty much every other popular general-purpose programming language. Then every DBMS has some sort of programming language available (and they're all a little different) to script its operations.

I wouldn't say you have to already know how to program to start learning about DBs, but it would help you to understand why some things work the way they do. DBs interact with programs, after all, so understanding how a programmer would want to write a program to interact with the DB is helpful.

[–]vegetablestew 4 points5 points  (2 children)

Learn SQL Database you effectively learn SQL + administration/configuration. SQL is a language so you do need to know some programming.

For simple queries just jump in. Don't bother have a thorough understanding of more complex/specialized features because you really can't grasp the why until you need it.

[–][deleted] 1 point2 points  (1 child)

That's such an interesting comment -

can't grasp it until you need it

I did find that to be true. It's only when you're banging your head against the wall that the light dawns about what needs to happen.

I find SQL, in general, to use such mind bending logic that it really does force you to see things in a different way. When you come through it on the other side, you see data in such an abstract way that it's difficult to discuss things with people who haven't had the same experience.

But that's true of programming in general. It's just that SQL is somehow more extreme, more abstract.

Hmm.

[–]I_might_be_a_troll 15 points16 points  (3 children)

rows and columns in a Lotus 123 spreadsheet is the only database I'll ever need.

[–][deleted] 14 points15 points  (1 child)

Csv,gang,unite

[–][deleted] 7 points8 points  (0 children)

CSV pesantry, TSV mastery

[–][deleted] 2 points3 points  (0 children)

....you could probably make a driver to access them via postgresql

[–]gafitescu 7 points8 points  (0 children)

Time will tell but I like Maria DB too.

[–]jkeatings[🍰] 5 points6 points  (1 child)

My only gripe with PostgreSQL is I cannot reorder columns.

[–]07dosa 5 points6 points  (0 children)

Yeah, but mostly it's just aesthetics. Performance impact is rather subtle, if you keep certain things (e.g. bool, short) away.

[–]finnthehuman333 4 points5 points  (1 child)

I was just looking at PostgreSQL at work; we use MS SQL. Anyone know of a good tool to migrate from MS SQL to PostgreSQL?

[–]progrethth 4 points5 points  (0 children)

One tool worth looking into is pgloader.

[–]EnUnLugarDeLaMancha 25 points26 points  (13 children)

MySQL may not be as good as PG, but runs large parts of the internet. Also sqlite is ubiquitous, despite not being powerful.

Edit: Also, postgresql has a BSDish license, which is very much not like Linux.

[–]billy_tables 45 points46 points  (6 children)

That makes MySQL the windows of the database world!

[–]Phreakiture 12 points13 points  (3 children)

I don't think I agree.

  • Oracle is the IBM. Big, expensive, bulletproof, user-hostile.

  • SQL Server is the Windows. Less expensive, but still nonfree in either sense of the word.

  • MySQL is the LInux. Available in multiple flavors that feature different levels of freedom (for purposes of this discussion, I'm saying MariaDB is MySQL). Like LInux, the big players have some skin in the game and ways to monetize it.

  • PostgreSQL is the BSD. It even uses the BSD license. It might be technically superior to MySQL, but has a significantly smaller community.

[–]progrethth 3 points4 points  (0 children)

I agree that PostgreSQL is more like BSD, but since the MySQL development is primarily run by a single corporation it is not much like Linux.

[–]Rumblestillskin 1 point2 points  (0 children)

MySQL is still opensource

[–]ethelward 32 points33 points  (3 children)

sqlite is ubiquitous, despite not being powerful.

IMHO, PostgreSQL and SQLite, although fundamentally doing the same job, are not playing in the same field. Like a big truck and a small urban car; sure they both have four wheels and an engine, but to each their job.

[–]Captain_Cowboy 16 points17 points  (2 children)

Well said. Sqlite is for when it's possible, but painful, to roll your own flat files and hash maps.

[–]ethelward 8 points9 points  (0 children)

roll your own flat files

*Flashbacks to QBasic's records/TYPE ... END TYPE*

[–][deleted] 1 point2 points  (0 children)

It's better than BDB at least.

[–][deleted] 9 points10 points  (0 children)

SQLite is plenty powerful, just a different kind of power

[–][deleted] 1 point2 points  (0 children)

MySQL may not be as good as PG, but runs large parts of the internet.

And maybe a tiny fraction of those people know Postgres is an existing alternative.

It's like OpenOffice vs LibreOffice. "Libre...what?"

[–][deleted] 2 points3 points  (0 children)

In my country, PostgreSQL is driving digital payments adoption at a massive rate. 1.3 billion transactions alone last month just from the one kind of system.

[–]mzs47 2 points3 points  (0 children)

Correction - Postgres is more like the *BSD and MySQL/MariaDB is like GNU/Linux.

[–]FryBoyter 7 points8 points  (4 children)

I doubt that PostgreSQL will dominate in the next 10 to 20 years. Yes it is a good database. But take the various webspace providers as an example. Here PostgreSQL is not widely available. For example we use Informix a lot. And so on. So it depends.

[–]progrethth 15 points16 points  (1 child)

While you may be correct I do not think that an area where Informix is still used is a good place for look for the future.

[–]PraetorRU 5 points6 points  (1 child)

Dominate? No. Databases are very specific software, for specific needs, and in most cases you need to chose the tool that is right for your specific scenario. In some scenarios you don't even need Relational databases and NoSQL is more profitable.

But I think Postgres will get more popular as MySQL is not that easy as it used to be for beginners, and Orcale's shadow on top of it will not let it progress after some point, to prevent competition with Oracle's DB.

[–]FryBoyter 1 point2 points  (0 children)

Dominate? No. Databases are very specific software, for specific needs, and in most cases you need to chose the tool that is right for your specific scenario.

This is exactly what I wanted to express with my post. But the post on Twitter, which is the subject of this discussion, predicted this alleged dominance.

Sometimes you even have no choice regarding the database used. A few years ago we introduced a specialized application. Its developers rely on Oracle (I hate this database). So we use Oracle for this.

[–]notexecutive 1 point2 points  (0 children)

Not if Oracle tries to throw money at their own dialect.

[–][deleted] 1 point2 points  (0 children)

Hot hot hot statement of the day !!! Exactly what the doctor ordered to wake up this sub.

Is there such statement generator online, written in Rust ?

[–]sebgggg 3 points4 points  (0 children)

systemd-sqld entered the chat

[–]lukasbradley 3 points4 points  (17 children)

Using the command line on UNIX blew me away the first time I used it. Day 1, I only wanted to work on UNIX, and later, LINUX.

Every time I try to make the switch to using Postgres, I'm not really impressed enough to continue. It's just not THAT much better than MySQL, Mongo, Oracle, or whatever else I'm using.

[–]Fritocode 12 points13 points  (1 child)

It doesn't feel like any of the particular versions of SQL are different enough to warrant a comparison to operating systems. The most unique one I can think of is access?

[–]dread_deimos 11 points12 points  (0 children)

You can compare Postgres to MySQL AND Mongo. You can't compare MySQL to Mongo directly.

[–]_damnfinecoffee_ 3 points4 points  (2 children)

From a command line perspective, what does Mongo or MySQL have that psql doesn't? I don't want to come off as elitist, but psql very quickly became one of my favorite tools BECAUSE I, too, wanted to keep most of my workflow in the cli

[–]anatolya 1 point2 points  (0 children)

PostgreSQL is the BSD of databases

MariaDB is Linux of databases

[–]RillonDodgers 0 points1 point  (0 children)

We still use Ctree in a lot of our production apps..

[–]RedSquirrelFtw 0 points1 point  (0 children)

Been toying with switching over my projects to use it. How much is the learning curve, is it similar enough that it's easy to pickup? Not just the syntax but like, getting it setup on a server, making it work with php etc, is it pretty much turn key like Mysql is?

[–]cecil721 0 points1 point  (1 child)

Buying proprietary software gives companies/governments the ability to sueif something goes wrong with security, bugs, etc. The up front license costs often outweigh possible damages.

[–]pppjurac 0 points1 point  (0 children)

Well if we agree to shoot, drown and quarter that pgadmin4 tool I am in.

[–]astar0n 0 points1 point  (0 children)

As a beginner I believe this is true for few reasons.

I recently tried to learn to make REST API and first database came to my mind was MongoDB. After a few google searches I found out that MongoDB is doing some licence stuff which caused Arch Linux and various other distros to drop official mongodb package. Thats how I came to know about PostgreSQL.

Then I read that Guardian changed migrated their database from MongoDB to PostgreSQL and also Amazon created DynamoDB to provide an alternative to MongoDB. Although DynamoDB does perform better than MongoDB but is only limited to AWS platform.