Live data from Hacker News

PostgreSQL vs. MS SQL

pg-versus-ms.com

71–80 of 106 posts

Re: PostgreSQL vs. MS SQL

#71

This article is a fantastic tour of some of Postgres' programmer-friendly features. If you're interested in databases but aren't familiar with Postgres, it'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. (For whatever it's worth, I love MSSQL. Be…

This is exactly the feeling I got from the article. While the author did state that he wasn't as familiar with MSSQL as with PostgreSQL, he didn't do very well in enumerating on the facts surrounding his criticisms of MSSQL. I think this greatly hurt his good points.

But yeah, an awesome resource for people dipping their toes in the Postgres pool.

Re: PostgreSQL vs. MS SQL

#72

As a DBA, that has years of experience with both. I disagree with you. I stopped reading after the very first bullet, and just skimmed through most of the titles. First, you can import/export csv's. Hell all you need to do to export, is right click the view and hit export, then select .csv. Second, you don't want such a simple installation, MSSQL has several options/packages/configurations. If you don't need it you t…

My experience with MsSql has been more like You can sorta kinda export CSV files that will mostly work in Excel if the data happens to be just right. His description of how easy it is in Postgres makes me want to grab a copy and try it out. I really hope somebody tells me that there is infact a way to export query results from MsSql to CSV if the text columns might contain commas that isn't a huge ugly PITA.

I don't know about most of the other stuff, honestly. I've never felt the need to write scripting code into database queries or write my own aggregate functions, so I have no idea what would be better at that. I'll take his word that Postgres is better, and grab it if I ever find myself having to do that.

Re: PostgreSQL vs. MS SQL

#73

MSSQL has some problems, some of which the post talks about. However, I tried pg out, planned to use it instead of MSSQL. 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. Instead, last I tried (9.0 I t…

If you are interested in Postgres way of doing multiple result sets you can check out my post on it https://blog.dsl-platform.com/multiple-result-sets-alternati...

Re: PostgreSQL vs. MS SQL

#74

MSSQL has some problems, some of which the post talks about. However, I tried pg out, planned to use it instead of MSSQL. 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. Instead, last I tried (9.0 I t…

#1 has gotten significantly better since 9.0. There are still issues, but it continues to get better.

For #2, there are plenty of managed PG services (AWS RDS, Heroku, etc) if you have trouble with the sysadmin.

For #4, Postgres has materialized view support in 9.3 with some improvements in 9.4.

https://wiki.postgresql.org/wiki/What%27s_new_in_PostgreSQL_...

https://wiki.postgresql.org/wiki/What%27s_new_in_PostgreSQL_...

Re: PostgreSQL vs. MS SQL

#75

I scrolled to a random page. It was totally absurd, stopped right there. "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, P…

Weird that OpenSSL isn't on the list of OSS projects.

Weird that Google Maps isn't on the list of commercial projects next to iOS Maps...

Re: PostgreSQL vs. MS SQL

#76

I scrolled to a random page. It was totally absurd, stopped right there. "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, P…

As someone that uses PostgreSQL, would you care to elaborate on the topic? I haven't used MS SQL Server so maybe if you can actually provide some useful information we can start a discussion and learn something new.

Re: PostgreSQL vs. MS SQL

#77

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: A) Indexes disappeared without rhyme or reason. (This might have been a "too many cooks in the kitchen" thing, where someone restored from a backup and didn't tell anyone.) B) In the default configuration provided by the php…

A) Indexes do not just disappear. Someone dropped them or restored an older version of the DB. B) What? That's not SQL Server's fault, it's either a broken third party package or the display settings on your UI chopped the data to fit on a screen or something. C) Never heard about this. I even tried to google it but I can't find any information about this. Do you have a source? D) Third party tool problem probably. N…

I wrote the "third party tool" actually. It was tested thoroughly but on the few records with non-ASCII characters, the data came out weird. It was only about 10 or so records so I just manually corrected it. (I don't recommend this approach, it was a "we're under the gun, just change history and don't fret" decision)

Re: PostgreSQL vs. MS SQL

#78

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: A) Indexes disappeared without rhyme or reason. (This might have been a "too many cooks in the kitchen" thing, where someone restored from a backup and didn't tell anyone.) B) In the default configuration provided by the php…

I don't think your experiences with SQL Server are representative. I'm not a fanboy, I've run into more than my fair share of issues with MS SQL, but none of your problems are a result of any SQL Server version I've heard of. Your response screams FUD, to me. Now, you say that you possibly had too many cooks in the kitchen. So perhaps your complaints are due to the other cooks, or maybe some of your complaints came t…

D) Nope. I wrote the tool and tested it multiple times. The data kept coming out malformed, and playing with mb_convert_encoding() didn't really help much.

I appreciate the feedback though. This was my only time ever using MS SQL.

(Re: the 255 char thing, I had to edit the /etc/tsql/tsql.conf to change the sybase version to make the problem go away. Not a MSSQL problem, but definitely a problem with using it from a PHP + nginx on Linux env.)

Re: PostgreSQL vs. MS SQL

#79

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: A) Indexes disappeared without rhyme or reason. (This might have been a "too many cooks in the kitchen" thing, where someone restored from a backup and didn't tell anyone.) B) In the default configuration provided by the php…

I've been using MSSQL since the 7.0 days in the 1990s and have never seen nor heard of A) happening. As you said, I'm certain this was "too many cooks in the kitchen."

I didn't have DBA access so I couldn't do much to prove someone had maliciously dropped indexes. It was about an every-other-month occurrence, and it would make our response time go from 200 ms to 90s.

Re: PostgreSQL vs. MS SQL

#80
post #38

Three things I really enjoy about MSSQL are: 1) SQL Server Data Tools for complex schema management. 2) Graphical execution plans. 3) It'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.

Just on your #2: I'm not entirely sure how the graphical executions plans help in the end. I've seen too many plans that wouldn't fit on 30" display. The postgresql explain text format is reasonable, and can even be automatically logged when queries are slow [1]. http://www.postgresql.org/docs/9.3/interactive/auto-explain....

If an execution plan doesn't fit on your 30" monitor then you've probably got a more sophisticated query that requires more analysis than simply eyeballing execution plans for clustered index scans or places where predicate pushing hasn't worked as effectively as you hoped.

External tools aren't really in the scope of this discussion, but while SSMS does a pretty good job of visualizing execution plans SQL Sentry Plan Explorer does a better job (a more compact view with a color gradient for the most expensive operators) and makes my job even easier.

http://www.sqlsentry.com/products/plan-explorer/sql-server-q...

Post reply on HN