Live data from Hacker News

PostgreSQL vs. MS SQL Server

pg-versus-ms.com

131–140 of 141 posts

Re: PostgreSQL vs. MS SQL Server

#131
> I replied "well there are 1.5 billion Muslims and 1.2 billion Catholics. They can't all be right". Ergo, a billion people most certainly can be wrong. (In this particular case, 2.7 billion people are wrong.)

Very smug and condescending statement. Feels like an insecurity on the author's part.

Re: PostgreSQL vs. MS SQL Server

#132
post #92

I was expecting something more convincing like benchmarks, PostgreSQL has a lot of nice features and that's is a good thing for development, but just for development.

Ah, but you can't publish benchmarks about any of the RDBMSs for adults (Microsoft and I think Oracle too) as per their license agreement. So never expect these types of articles to have any substance.

Re: PostgreSQL vs. MS SQL Server

#133

Earlier quoted context omitted.

> It has a feature named materialized views, but it isn't close to being the real feature that MSSQL calls it. MSSQL doesn't have a featured called materialized views, it has a feature called indexed views which happens to implement a fairly robust version of the general DB pattern called materialized view. PG has less mature materialized views (which are called materialized views) starting from 9.3, with additional…

Well I can't think of a scenario where I want a single-updated materialized (or indexed) views. Because I can already do that by creating a table from a SELECT statement. So I don't see the point or use of what PG has implemented. I asked in IRC and got the same answer. It's like saying a read-only table supports updates cause you can drop it and rebuild it with the new data. When would anyone really need PG's versio…

Anything you can do with materialized/indexed views (including most conceivable update models) you can do with the right combination of creating tables with SELECT statements and the right triggers to rebuild and/or update the tables.

What specialized syntax for materialized views and related configuration provides is some combination of clarity of intent, developer convenience, performance improvements over the most naïve update implementations, and additional information for the planner to use to optimize queries.

Postgres current level of support for named-as-such MVs provides basically the first two benefits for certain situations (and a little bit of the third in certain situations via REFRESH MATERIALIZED VIEW CONCURRENTLY.)

Re: PostgreSQL vs. MS SQL Server

#134
post #132
post #92

I was expecting something more convincing like benchmarks, PostgreSQL has a lot of nice features and that's is a good thing for development, but just for development.

Ah, but you can't publish benchmarks about any of the RDBMSs for adults (Microsoft and I think Oracle too) as per their license agreement. So never expect these types of articles to have any substance.

I was looking for some earlier today, as I often do when one of these discussions comes up, and when I didn't find any, I suspected that might be the case. It's a shame, as it's another case where a company works to restrict user information, which makes the market less efficient.

Re: PostgreSQL vs. MS SQL Server

#135
post #62

Earlier quoted context omitted.

The write performance comes down to lack of clustered indexes on PostgreSQL. So yeah, it'll have better INSERT performance, but the queries will be slower. There's really no way around that. A large data set on disk that's out of order will always be slower than the one that's in-order. IMO MSSQL makes the right call for the vast majority of use-cases. PostgreSQL has -no- materialized views (I stand corrected! Introd…

> PostgreSQL has -no- materialized views (I stand corrected! Introduced in v9.3). No view update support. Like materialized views, automatic update support for simple views was introduced in 9.3.

[deleted]

Re: PostgreSQL vs. MS SQL Server

#136
post #62
post #12

I've been SQL Server user for many years. And for last two years I started also using PostgreSQL. Today I use both of them in my project, and as a developer/dba I see pros and cons: MS SQL: - The tools included like Management Studio are just great. This is totally next level to the Postgres tools. - Using multiple CPU cores for a single query is really helpfull in my scenario. - Easy continous backup to the cloud. -…

The write performance comes down to lack of clustered indexes on PostgreSQL. So yeah, it'll have better INSERT performance, but the queries will be slower. There's really no way around that. A large data set on disk that's out of order will always be slower than the one that's in-order. IMO MSSQL makes the right call for the vast majority of use-cases. PostgreSQL has -no- materialized views (I stand corrected! Introd…

I use covering indexes for most queries. It works Great for reads, and still write performance is better in postgres (on Linux).

https://wiki.postgresql.org/wiki/Index-only_scans

Re: PostgreSQL vs. MS SQL Server

#137

Earlier quoted context omitted.

GO is also recognized by sqlcmd, so you're (potentially) still good with automation. I did actually run the above script in SSMS, but I ran most of the ones at my old job automated.

You wouldn't perchance know a good online resource for recommendations on automating SQL Server deployments would you? Yes, you can google and piece things together, but I've yet to find a well written fairly comprehensive resource. (As the author notes, one would think perhaps MS would provide such documentation, but afaik they don't.)

It's all on MSDN, somewhere. TFA was incorrect that there isn't documentation available on SQL Server and T-SQL, but it's incredibly well documented, it's just MSDN's typical terrible discoverability.

Re: PostgreSQL vs. MS SQL Server

#138

This website is great. However, this doesn't actually touch on the real issue. I work at a MSSQL shop, and all of us know and are convinced that PG is better. Most of us use PG for our side projects and some of the dev's don't even use windows that much, with some custom MSSQL plugins we've built for linux. However, the problem still exists, of how do you port a ton of Databases over to Postgres? We're a multi-tenanc…

One thing that PG does that SQL Server doesn't do by default is it is built with MVCC in mind. If you want MVCC on SQL Server, you need to use snapshot isolation, and for snapshot isolation SQL Server needs to use TempDB.

TempDB, at least last I looked, doesn't really scale too well.

Just an observation.

Re: PostgreSQL vs. MS SQL Server

#139
post #136
post #62

Earlier quoted context omitted.

The write performance comes down to lack of clustered indexes on PostgreSQL. So yeah, it'll have better INSERT performance, but the queries will be slower. There's really no way around that. A large data set on disk that's out of order will always be slower than the one that's in-order. IMO MSSQL makes the right call for the vast majority of use-cases. PostgreSQL has -no- materialized views (I stand corrected! Introd…

I use covering indexes for most queries. It works Great for reads, and still write performance is better in postgres (on Linux). https://wiki.postgresql.org/wiki/Index-only_scans

That's not really anything to do with sorting. At least not covering indexes as I'm familiar with them.

Re: PostgreSQL vs. MS SQL Server

#140

> Commercial products have support from people who support it because they are paid to. They do the minimum amount necessary to satisfy the terms of the SLA. This is pretty ridiculous and quite a bit insulting to the many people who do work for vendors. I work in a team that has a number of engineers supplied by vendors and they are generally fantastic. Highly qualified, more than happy to assist with tasks that aren…

> Someone really needs to explain to me why PostgreSQL users in particular seem to always want to bash the competition in order to justify their technology choice. It's been going on for years against MySQL/Oracle first, then MongoDB/NoSQL and now SQL Server. It's odd.

I think it's less about PostgreSQL, and more about the particular products:

1. Oracle has always been a piece of crap from a technology standpoint. There are good reasons businesses use it, but they don't have to do with a robust, core product.

2. Early versions of MySQL were a joke. It's pretty good now, but for a long time, it was the butt of many jokes for good reason. It was very easy-to-use, and fast if you didn't need data consistency, but it didn't quite work right.

3. Stonebraker aside, I haven't heard much bashing of NoSQL. It's used in many places where it's the wrong tool for the job (JOINs are useful), but it's great where it is the right fit. It's just that MongoDB, in particular, isn't great if you have data integrity or performance requirements you care about.

4. I don't even know where to start on SQL Server. Seriously. The only reason to use that dog is if you're tied to a Microsoft-only shop.

There are lots of great technologies out there -- Cassendra, Google's Bigtable, memcached, modern versions MySQL, etc. -- which I've never heard people mocking. Conversely, users of most of those tend to make fun of the broken databases just as much as PostgreSQL users do. It's just that you see the PostgreSQL users doing more mocking simply because there are more of them out there.

Footnote: I'm developing on a MySQL+MongoDB stack right now. MySQL is great, but MongoDB is a bad joke.

Post reply on HN