r/SQLServer • • Jan 12 '26

Discussion Migrating from Microsoft SQL server to Postgres

My team and I are currently working with an MSSQL database and now have the opportunity to migrate to PostgreSQL. Would you recommend making the switch?

For context:

- ~100GB of data

- Heavy use of recursive queries (we have recursive relationships between tables)

- Using an ORM

Edit note: Forget to mention is that I have json objects that I save In a column. Now I do not query this but post great has a better interface for dealing with json with the Jsonb.

Based on this, I'd love to hear your experiences and feedback. Thanks!

24 Upvotes

50 comments sorted by

View all comments

Show parent comment

1

u/aaahhhhhhfine Jan 13 '26

Yes, I'm familiar with what json is.

It's cute to think solely in terms of your db looking pretty or following normal forms. But it's good to remember that databases are usually there to support applications. And it turns out that when those applications are serving up a crap load of json... It can be a lot more efficient to store the data in that format to begin with. Rdbms can be awesome for that actually because you can get the best of both worlds by writing out fields you want to index while also storing a block of json in a single field.

Yes it is "schemaless" as far as the database cares (although some systems can govern that a bit in various ways)... But, again, your application can enforce anything it wants - including a very tight schema. Sometimes that looseness is also a huge benefit.

I can't speculate why the SQL Server team was slow about adding json support. I think that was a huge strategic error. I would assume it was to try to prop up alternative products in the azure ecosystem. Microsoft does that a lot, usually to their detriment.

But yes... Lots of huge fancy applications store all kinds of json in relational databases. Heck the last time I looked reddit itself was built that way. And yes... dumb and inexperienced DBAs bitch about it... Nothing new here.

1

u/rustprogram Jan 16 '26

Yes, we all do this but in my experience it is usually because we don't know yet what columns we need so we use json "temporarily". 

It is especially helpful in marketing led initiatives where I want to avoid entity attribute values.