> I understand that there are some fancy DB things that it can do and it's optimizer can be better in some circumstances
That's a pretty big deal. (Also not sure what the ORM has to do with it... Unless it's just the fact that ORMs dumb down the queries that are possible)
Is it though? Is the Postgres optimizer that much worse? As for the ORM, I was trying to point out that something like ActiveRecord doesn't rely on the inherent capabilities of the RDBMS as much as raw SQL might. So things like stored procedures, triggers, advanced CTEs, etc. don't really add any value.
What tends to happen is death by a thousand cuts. Postgres can probably be tuned to efficiently run most queries that SQL Server could run, but DBA time is spent on it when on SQL Server the issue might just simply not exist. It also really helps power users who know enough SQL to write a report, but maybe not enough to tune queries.
That's a pretty big deal. (Also not sure what the ORM has to do with it... Unless it's just the fact that ORMs dumb down the queries that are possible)