TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

PostgreSQL vs. MS SQL

142 pointsby cribwiover 10 years ago

19 comments

general_failureover 10 years ago
I scrolled to a random page. It was totally absurd, stopped right there.<p>&quot;Crucially, because open-source software tends to be written by people who care deeply about its quality (often because they have a direct personal stake in ensuring that the software works as well as possible), it is often of the very highest standard (PostgreSQL, Linux, MySQL, XBMC, Hadoop, Android, VLC, Neo4JS, Redis, 7Zip, FreeBSD, golang, PHP, Python, R, Nginx, Apache, node.js, Chrome, Firefox...). On the other hand, commercial software is often designed by committee, written in cube farms and developed without proper guidance or inspiration (Microsoft BOB, RealPlayer, Internet Explorer 6, iOS Maps, Lotus Notes, Windows ME, Windows Vista, QuickTime, SharePoint...&quot;
评论 #8616047 未加载
评论 #8615986 未加载
评论 #8616045 未加载
评论 #8616667 未加载
评论 #8615991 未加载
blahblahOOOover 10 years ago
As a DBA, that has years of experience with both. I disagree with you.<p>I stopped reading after the very first bullet, and just skimmed through most of the titles.<p>First, you can import&#x2F;export csv&#x27;s. Hell all you need to do to export, is right click the view and hit export, then select .csv.<p>Second, you don&#x27;t want such a simple installation, MSSQL has several options&#x2F;packages&#x2F;configurations. If you don&#x27;t need it you turn it off, otherwise you will be charged a fee.<p>That being said, if you have chocolatey installed in powershell. It&#x27;s also a one line command, and you can configure your own custom installation command.<p>choco install MsSqlServer2012Express<p>Third, I don&#x27;t feel like correcting the rest of your mistakes.<p>I&#x27;m not shitting on Postgres, it&#x27;s pretty awesome, but out of the box MSSQL is better. Especially when you have hundreds of severs running it.
评论 #8615846 未加载
评论 #8616629 未加载
评论 #8616056 未加载
评论 #8615856 未加载
评论 #8621338 未加载
JohnBootyover 10 years ago
This article is a <i>fantastic</i> tour of some of Postgres&#x27; programmer-friendly features.<p>If you&#x27;re interested in databases but aren&#x27;t familiar with Postgres, it&#x27;s a good read if you skip the criticisms of MSSQL. Some of those criticisms are spot-on, some are iffy, and some are rah-rah-yay-yay-open-source exhortations that seem to be lifted from Slashdot threads fifteen years ago.<p>(For whatever it&#x27;s worth, I love MSSQL. Been using it for well over a decade. That said, I certainly don&#x27;t mind reading criticisms of it.)
评论 #8616559 未加载
keithwarrenover 10 years ago
There is so much here, it is so verbose...so religious.<p>There is the appearance of facts, but mostly it is bias by omission. Take for example the CSV complaints...&quot;MS SQL Server can neither import nor export CSV. Most people don&#x27;t believe me when I tell them this&quot;. This is just false, patently and obviously false. BCP and SSIS, both part of SQL Server have excellent support for importing and exporting flat files. I did keyword searches through the whole post, no instances of BCP, SSIS or Integration Services (the long term for SSIS).<p>I am sure others will break this thing apart section for section but I wish people would be fair and open about stuff like this - I mean, seriously if you are going to put the time and effort into a long document like this, don&#x27;t be so blatantly bias.
评论 #8615914 未加载
评论 #8615938 未加载
评论 #8615880 未加载
threeseedover 10 years ago
The author is pretty misinformed about how enterprises work.<p>a) Security is critical. It routinely trumps common sense and evidence. And telling people &quot;not to fall for it&quot; is advice that will get you nowhere.<p>b) Vendor support is critical. And no your local mom+pop consulting shop doesn&#x27;t count. PostgreSQL could really do with solid, global companies like Microsoft, Datastax, Mongo etc who offer training and proper SLAs.
评论 #8616057 未加载
评论 #8617119 未加载
评论 #8615869 未加载
评论 #8615868 未加载
评论 #8621383 未加载
taspeotisover 10 years ago
Three things I really enjoy about MSSQL are:<p>1) SQL Server Data Tools for complex schema management.<p>2) Graphical execution plans.<p>3) It&#x27;s the database best supported by Entity Framework. If you know what IEnumerable is, and you know what IQueryable is, and you know what a leaky abstraction is, you can use EF to quickly start getting data in and out of SQL Server with very reasonable performance.
评论 #8615931 未加载
评论 #8616041 未加载
duncansover 10 years ago
I develop against MSSQL most of the time and have tinkered with Postgres a bit was agreeing with most of the points, until I got to:<p>&gt; &quot;but MS SQL Server does have a bizarre failure mode which I have witnessed more than once: its transaction logs become enormous and prevent the database from working. In theory the logs can be truncated or deleted but the documentation is full of dire warnings against such action.&quot;<p>This belies what appears to be a fundamental ignorance of SQL Server and is not at all bizarre. If a database has been deployed in a non-simple recovery model, then the transaction log needs to be truncated as part of a backup procedure. If this isn&#x27;t the case then you should have hired a&#x2F;better DBA.
masklinnover 10 years ago
&gt; PostgreSQL: the docs actively encourage you to simply use the TEXT type. This is a high-performance, UTF-8 validated text storage type <i>which has no length limit</i>.<p>The emphasised part is incorrect, Postgres&#x27;s text storage has a 1GB limit (that stands for CHAR, VARCHAR and TEXT which all use the same underlying mechanism): <a href="http://www.postgresql.org/docs/9.4/static/datatype-character.html" rel="nofollow">http:&#x2F;&#x2F;www.postgresql.org&#x2F;docs&#x2F;9.4&#x2F;static&#x2F;datatype-character...</a><p>&gt; In any case, the longest possible character string that can be stored is about 1 GB.<p>Although note that this is 1GB, you have to take in account both multibyte characters and compression (which by default is enabled on text values of more than 2k, using LZ)
评论 #8615874 未加载
评论 #8615978 未加载
sarciszewskiover 10 years ago
I too am biased towards PG. At one of my previous gigs, I had to develop a HTML5 mobile app around a MS SQL database (though eventually we migrated to PostgreSQL). Among the problems we ran into:<p>A) Indexes disappeared without rhyme or reason. (This might have been a &quot;too many cooks in the kitchen&quot; thing, where someone restored from a backup and didn&#x27;t tell anyone.)<p>B) In the default configuration provided by the php5-mssql package in Ubuntu, text fields were chopped at 255 characters.<p>C) Our Windows Server did updates, then came back up with a &quot;you need to renew your license&quot; lock that prevented any I&#x2F;O and cost us half a day of productivity (on top of the licensing costs).<p>And of course, D) it screwed up the file encoding when we did the final export during the &quot;migrate to PostgreSQL&quot; step.<p>Incidentally, migrating our platform to PostgreSQL and kicking the tires was one of the last projects I completed at that job, and everyone was much happier for it.
评论 #8615799 未加载
评论 #8615663 未加载
评论 #8615945 未加载
评论 #8616276 未加载
评论 #8618705 未加载
tracker1over 10 years ago
The author mentions no understanding N&#x27;V&#x27; etc, early on, then rants about MS&#x27;s support for Unicode...<p>Also, IMHO one of the single biggest shortcomings from PostgreSQL is that there&#x27;s still no baked in solution for replication with any kind of either multi-master or hot failover. If PostgreSQL supported this (in the box) as well as MongoDB was, along with having PL&#x2F;v8 support easier to install, it&#x27;d be my db of choice.<p>MS-SQL does have a lot of shortcomings compared to PostgreSQL from a developer perspective, but from being able to easily install and administrate one over the other, I think MS-SQL has a significant lead here.<p>As long as replication&#x2F;sharding are bolt-on solutions for PostgreSQL, it really isn&#x27;t an option for a lot of projects.
评论 #8617173 未加载
Pherdnutover 10 years ago
Alright so somebody with experience in a wide variety of DBs help me out here. Are the enterprise solutions really any more scalable than something like postgresql or is it more that they&#x27;re more accommodating an enterprise mentality where you&#x27;ll tend to run into more skill level diversity on the extremes and team A often doesn&#x27;t necessarily have team B&#x27;s expertise at stuff? By accommodating of course I mean willingness to take a buttload of money to help teams out with problems when needed and&#x2F;or to blame when their mistakes explode in their faces and to never ever try to tell anybody that they&#x27;re doing it wrong once VIPs with enough hit dice are invested in that sort of thing.<p>I do gather that a lot of DB admins that aren&#x27;t very political about it do in fact respect MS SQL for some of its more competitive features. I&#x27;m just wondering if there&#x27;s any reason to start with it for a low-cost startup scenario that could ultimately result in a non-trivial but fairly straightforward DB schema with potential for being used by very large institutions (universities at the largest I&#x27;d imagine).<p>I&#x27;m ignorant enough (primary experience is in web UI) that I&#x27;m leaning towards postgresql because I like the way the Django guys think and they seem to dig it. Also the no-nonsense license and yes, the not-profit-motivated thing is nice when backed by a strong core group which I gather postgres has.<p>But do the enterprise DB solutions handle severely massive amounts of scale better for some reason? Or is it more that they&#x27;re culture-friendly to the sorts of companies that typically handle DBs of this nature?
jamhanover 10 years ago
For all its faults, this article does mention one thing about PostgreSQL that I have always been happy with: ease of installation.<p>Having been through many, many installs of Oracle and MS-SQL in my career, the speed at which you can get a PostgreSQL server up and running with data is simply awesome.
评论 #8617163 未加载
swasheckover 10 years ago
Hm. I love postgres and find many of its features to be intriguing and exciting. I work with MS SQL Server professionally and find many of the things it does to be excellent as well. The unfortunate thing about this piece is that much of it is actually Op-Ed and is based on the author&#x27;s preference (e.g. cascading drop). The second section is nearly unreadable as it&#x27;s full of FUD and smear.<p>Yes, there are things that PG does better than MSSQL. Yes, there are things that MSSQL does better than PG. It sucks that we still have to debate it based on a smear piece from someone with an agenda.
MichaelGGover 10 years ago
MSSQL has some problems, some of which the post talks about. However, I tried pg out, planned to use it instead of MSSQL.<p>1. HA, via replication, clustering, etc. are all fantastic as well as easy and trivial to setup. Once PG can offer a simple little wizard and setup replication, or shared-nothing clustering with automatic fail over, awesome. Or even tx log shipping with a few clicks.<p>Instead, last I tried (9.0 I think), pg drops you off with some weird system that makes you run shell as a specific user, where you run generic sounding commands. Oh and some default config that seemingly has some bad defaults you probably should change.<p>2. Overall, MSSQL makes it easy to run a DB. I was doing a billion transactions a day (each which wrote to a few tables and also included a real ACID balance update), and I didn&#x27;t need a full time DBA or have to have particularly awesome experience beforehand. With pg, I sorta got somewhere, but I had little confidence<p>3. Development is far superior on MSSQL. Supporting other languages is a null point, because they aren&#x27;t running as part of the query execution engine. That is, there&#x27;s no real difference in using Python inside PG versus an external client, as far as I could tell. You still had to submit queries and make a transition. So TSQL seemed far nicer to work with than plpgsql. Although, the record types in pg were much nicer I&#x27;ll admit. Another annoyance: pg didn&#x27;t offer multiple returnsets in many situations. This made it awkward to run a sub function that needed to return results from different tables as separate queries. And the perf tools and UI was just so, so much better.<p>4. There&#x27;d be strange &quot;little&quot; features you&#x27;d just expect to be there, like materialized views, which pg simply does not have. Pg still lacks materialized views. The current implementation is essentially pointless, as it doesn&#x27;t update the view automatically.<p>I&#x27;m very much for PG, and believe it&#x27;s an important project and am trying to use it for future development. Much because Microsoft went back on its word that it wouldn&#x27;t move to an Oracle-style licensing where you pay for CPU power instead of just sockets. They&#x27;ve also made questionable decisions with Enterprise vs Standard, putting extra cumbersome limitations. They aren&#x27;t adding features like JSON or arrays quickly. And also, I think it&#x27;s important to run open source and try to make sure free systems stay viable.<p>But MSSQL has a lot going for it, and the ease of use and built in HA options don&#x27;t even seem like goals for PG. If licensing weren&#x27;t in the way, and I just wanted an easy system that was capable but didn&#x27;t require lots of time, MSSQL makes a strong choice.
评论 #8622976 未加载
评论 #8616651 未加载
评论 #8616643 未加载
ely-sover 10 years ago
Microsoft has a thing for very long names though – possibly its greatest achievement ever is<p><pre><code> Microsoft® WinFX™ Software Development Kit for Microsoft® Pre-Release Windows Operating System Code-Named &quot;Longhorn&quot;, Beta 1 Web Setup</code></pre>
dscrdover 10 years ago
Tangentially, can anyone recommend a good book for learning PL&#x2F;PGSQL and other ways to procedurally program on psql?
pathikritover 10 years ago
Is there something like this for MYSQL? pg-versus-my.com?
codexonover 10 years ago
What about the lack of upsert in PostgreSQL?
评论 #8616530 未加载
评论 #8617070 未加载
arthursilvaover 10 years ago
Pg is SOLID but I&#x27;m sure mssql have its merits.