know.2nth.ai Data Warehousing Postgres vs MSSQL
data · warehousing · Postgres vs Microsoft SQL

Drop the SQL Server licence without breaking production.

If you're paying Microsoft SQL Server licences for an OLTP workload and a reporting/BI workload running on top of it, the second one is the easy win. Most of what your BI team does — dashboards, ad-hoc queries, exports, the data warehouse — doesn't need SQL Server. Hand that workload off to Postgres, keep production untouched, and most mid-market teams cut their SQL licence by 35-70% this quarter without anyone noticing.

Decision guide BI offload first, full migration later ~$34k saving on a 16-core SMB 4-6 week typical timeline

Pick by appetite for risk.

Most "should we move off SQL Server?" conversations stall because the team conflates two very different projects. The cheap-and-fast play and the strategic-replacement play have nothing in common except the destination database.

// Bigger play, more work

B. Full migration

Production OLTP migrates from SQL Server to Postgres. Stored procedures rewritten. Application connection strings repointed. Eventually: SQL Server retired entirely.

  • T-SQL stored procedures + triggers → PL/pgSQL rewrite
  • Application code review — connection drivers, query syntax differences
  • Cut-over weekend with parallel run, comparison, sign-off
  • SQL Server licences eventually cancelled entirely
  • Typical timeline: 3-9 months depending on stored procedure surface area
  • Risk profile: medium — touches production transactional path

The advice almost no consultant gives

Do A first. Bank the savings, learn the Postgres operational model on a non-production workload, build the team's confidence. Then decide whether B is worth doing — and by then the math is much clearer. Companies that try B first often fail B; the team is fighting both an unfamiliar database and an unfamiliar production cutover at once.

A read-side replica nobody else is paying for.

A continuous data stream from SQL Server's transaction log into a Postgres warehouse, refreshed every few seconds. The BI team's queries hit Postgres; the operational team's writes hit SQL. Nobody's reports go down; nobody's transactions slow down.

Production OLTP
Microsoft SQL Server
Application reads + writes. Same as today.
Analytics
PostgreSQL warehouse
All reporting + BI queries.
Replication options (commodity now): Debezium (open-source CDC, connects to SQL Server's transaction log), Fivetran (managed, ~$0.001 per row), AWS DMS (per-instance pricing), Airbyte (open-source), Striim (enterprise CDC). Most SMBs land on Debezium-into-Postgres or Fivetran for the SaaS convenience. Replication lag is typically 1-5 seconds. The BI team will not notice a delay; the SQL Server team will not notice the read load they used to have.

Not just because it's free.

The analytical query patterns BI teams run (large aggregations, window functions, time-series rollups, JSON extraction, geospatial joins) are where Postgres is genuinely strong — often stronger than SQL Server, and where the open-source ecosystem has spent the last decade adding extensions that turn Postgres into a credible warehouse.

Window functions + CTEs

First-class. The bread-and-butter of analytical SQL works the same in Postgres as in any modern engine — often with subtler optimisations than T-SQL's.

JSON / JSONB

Native columnar JSON with operator-based query syntax (->, @>, jsonb_path_query). MSSQL has JSON-as-string; Postgres has JSON-as-data.

Materialised views

Pre-computed query results, refreshable on schedule or trigger. The right tool for "run this expensive joined report once an hour, not every time someone opens the dashboard."

Partitioning

Native declarative partitioning by range, list, or hash. pg_partman automates the lifecycle (create, archive, drop). Time-series tables stop being a tuning headache.

TimescaleDB extension

Time-series compression (90%+ reduction), continuous aggregates, hyperfunctions. SAP-grade analytics on append-heavy data without paying SAP-grade prices.

Citus extension

Horizontally distributed Postgres for warehouse-scale workloads. Scale beyond a single box without leaving the SQL dialect.

Foreign Data Wrappers

Query other databases from Postgres as if they were tables. tds_fdw reads SQL Server directly; postgres_fdw reads other Postgres; file_fdw reads CSVs.

PostGIS (geospatial)

The reference open-source GIS database. Spatial joins, indexed geography types, isochrones. Where retail / logistics analytics actually pay attention.

Side by side, honestly.

Both databases are mature, ACID-compliant, transactionally serious systems. The interesting differences sit at the edges: licensing, ecosystem, extension surface, and vendor coupling. The table below is the honest cross-product comparison — everywhere SQL Server is genuinely strong, it's flagged as such.

CapabilityMicrosoft SQL ServerPostgreSQL
ACID transactions, MVCCYesYes
Window functions, CTEs, recursive queriesYesYes
JSON / JSONB nativeJSON as text — no native indexed typeJSONB indexed, queryable
Materialised viewsIndexed views (limited)Full materialised views
Declarative partitioningYesYes (range / list / hash)
Geospatial / GISSpatial types, decentPostGIS — reference implementation
Time-series at scaleNative, manual tuningTimescaleDB — best-in-class
Stored proceduresT-SQL — mature, deep ecosystemPL/pgSQL — different syntax, same power
ReplicationNative + Always On AGsNative + logical replication + extensions
Read replicas / streamingYes (BI-Edition or AG licence)Yes — built-in, zero licence
BI tool ecosystemPower BI, SSRS, Tableau, Looker, all majorSame — every BI tool reads Postgres
Data warehousing at TB scaleYes (Synapse / SQL DW upgrade)Yes — Citus, partitioning, columnar extensions
Open-source / self-hostableNo — proprietary, licensedYes — PostgreSQL Licence (BSD-style)
Per-core licence (commercial use)Std ~$3,500/core/yr · Ent ~$15,000/core/yrFree
BI Edition / SSRS / SSAS licencePer-server + CAL stackNot needed — open-source BI tools talk to Postgres directly
Managed cloud optionAzure SQL / RDS for SQL ServerRDS Postgres / Aurora / Cloud SQL / Crunchy / Supabase / Neon
Foreign data wrappersLinked servers (PolyBase)Native FDW — query MSSQL, MySQL, MongoDB, S3 from inside Postgres
Vendor lock-inHigh — T-SQL dialect, SSIS pipelines, AD integrationLow — standard SQL, portable, multi-vendor support

A real number on a real workload.

Concrete example for a typical mid-market SA company: 16-core SQL Server Standard for production, BI Edition for reporting, 30-seat Power BI Premium per-user. Annualised, that's a real number — the kind that funds whole engineering hires.

Example · 16-core SMB, mixed OLTP + BI, before vs after BI offload
Line itemBeforeAfter offload
SQL Server Standard 16 cores (production)~$56,000~$56,000
SQL Server BI Edition / read-replica licence~$28,000$0
Power BI Premium per-user × 30~$7,200$0
SSRS / SSAS server licences~$8,000$0
Postgres warehouse (8-core managed RDS)$0~$4,800
CDC tooling (Debezium self-host or Fivetran SMB)$0~$3,000
Open-source BI (Metabase / Superset, self-host)$0~$1,200
Annual licence + tooling~$99,200~$65,000
Annual saving~$34,200 (35%)
This is the conservative version. Companies that retire SQL BI Edition entirely and hand all BI to Postgres — including the BI-tool licences, the SSRS infrastructure, the SQL-development time spent on T-SQL stored procedures for reporting — typically see 50-70% total saving on the SQL line. The cost-recovery period is one or two quarters; after that it's a permanent reduction.

Most SQL Server bills are 60-80% reporting and analytics workload. Hand that off, and the database under your application is a smaller, cheaper bill that's easier to migrate later — if you decide to.

Four weeks to first saving.

The honest shape of a BI-offload project at SMB scale. Longer at enterprise scale (more dashboards = more validation cycles) but the milestones don't change.

Week 1
Stand up Postgres warehouse — managed (RDS / Cloud SQL / Crunchy / Supabase) or self-hosted. Pick CDC tooling (Debezium self-host or Fivetran). Work out which SQL Server schemas need replicating; usually the OLTP transactional tables, not the SQL-Edition staging tables.
Week 2
CDC replication live in shadow mode. Backfill historical data. Verify row counts, check primary-key integrity, run test queries against Postgres versus SQL to confirm the answers match.
Week 3
Migrate one BI dashboard / report set at a time. Start with the simplest. Validate against the SQL-side report. Switch BI tool's connection string. Repeat for the next dashboard.
Week 4
All dashboards now on Postgres. Cancel SQL BI Edition / SSRS / Power BI Premium contracts at next renewal. Production keeps running. The licence saving lands at next renewal date — and recurs annually.

When to do A. When to skip straight to B. When to do nothing.

The honest two-sided framing. The BI-offload play (A) is right for almost every team paying for SQL BI Edition on top of OLTP SQL. The full migration (B) is right for a much smaller set — and only after A has banked savings and confidence.

Do the BI offload (A) when

  • You currently pay for SQL Server BI Edition, SSRS, SSAS, or Power BI Premium
  • Reporting / BI accounts for >30% of your SQL Server load
  • You want quarterly licence savings without touching production code
  • Your team can take 4-6 weeks of focused work this quarter
  • You need to build Postgres operational confidence before considering B
  • POPIA / data-residency benefits from a separate analytics database surface

When path B (full migration) starts making sense

You'll know in 6-12 months after A. The signal is: your production SQL Server workload starts looking simpler than the BI workload that's now running cleanly on Postgres. The team has the operational confidence. The application code's SQL-Server-specific parts are smaller than you remember. The renewal quote arrives, and the savings on the production licence start exceeding the migration cost.

The order matters. Companies that try B first often fail B. The companies that succeed at B almost always did A first, learned Postgres on a no-stakes workload, and went into the production migration with battle-tested ops and confident developers.

Why this lands particularly well in SA delivery work.

Microsoft SQL Server is over-represented in SA mid-market — the legacy of decades of Microsoft-aligned consultancies and Sage / Pastel / Syspro stacks that defaulted to MSSQL as the back end. That same legacy means SA companies typically pay more of their SQL spend on BI Edition and reporting tooling than the global average. The BI-offload arithmetic is correspondingly stronger.

Enterprise · banks, insurers, telcos, retailers on legacy SQL stacks

For SA enterprise running material SQL Server estates (often inherited through Sage X3, Syspro, Microsoft Dynamics, or in-house OLTP systems), the BI-offload play converts a multi-currency USD pain point into a one-time engineering investment. Pair Postgres in AWS Cape Town (af-south-1) or Azure South Africa North for regional residency. Use Debezium self-hosted on the same region for CDC; managed RDS Postgres on AWS supports SA region; Azure Database for PostgreSQL has SA region availability.

Studio · mid-market WMS / ERP / commerce builds

For SA studios building or modernising mid-market systems, the BI offload pattern fits cleanly into a typical engagement scope. Six weeks of focused work landing 35-70% licence saving is a delivery shape clients understand, and a saving they can show in next quarter's books. Common starting points: a ScanMan-style WMS, an ERPNext or Frappe modernisation of Sage / Pastel, or a custom logistics / retail system where reporting has overgrown the OLTP database.

FX-resilient stack

SQL Server licences are USD-billed. Postgres is free. CDC tooling like Debezium is free; Fivetran is USD but small. The net effect: a USD-heavy budget line transforms into a (mostly) ZAR-priced engineering line. For SA studios advising clients on technology cost-of-ownership, the BI offload is one of the cleanest demonstrations of an FX-resilient stack — same outcomes, cheaper budget, no FX exposure on the reporting layer.

Where this links in the tree.

Primary sources and tooling.