# SQL Server Page Compression Savings Calculator

> Source: https://netray.co/tools/sql-server-page-compression-savings-calculator
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Estimate the GB, cost and rebuild time of applying page compression to the large tables of an ERP database.

## Category

developer

## Erp

Microsoft SQL Server

## Audience

- DBA
- ERP analyst
- IT manager

## Tool

**Kind:** calculator

**Currency:** $

**Inputs:**

#### Database size

**Key:** db_gb

**Type:** number

**Default:** 1500

**Min:** 1

**Step:** 50

**Unit:** GB

#### Share of data in compressible tables

**Key:** eligible_pct

**Type:** slider

**Default:** 70

**Min:** 5

**Max:** 100

**Step:** 5

**Unit:** %

**Help:** Large history and transaction tables are good candidates. Skip tables with heavy updates or LOB data.

#### Expected compression saving

**Key:** saving_pct

**Type:** slider

**Default:** 50

**Min:** 10

**Max:** 85

**Step:** 1

**Unit:** %

**Help:** Take this from sp_estimate_data_compression_savings on a sample of tables.

#### Copies of the database stored

**Key:** copies

**Type:** number

**Default:** 3

**Min:** 1

**Step:** 1

**Unit:** copies

**Help:** Production, DR replica, test or QA refreshes.

#### Storage cost

**Key:** cost_gb_month

**Type:** number

**Default:** 0.1

**Min:** 0

**Step:** 0.01

**Unit:** per GB per month

**Help:** Include SAN or cloud disk and snapshot cost.

#### Rebuild throughput

**Key:** rebuild_gb_hr

**Type:** number

**Default:** 60

**Min:** 1

**Step:** 5

**Unit:** GB/hour

**Help:** Measured speed of an ALTER INDEX REBUILD WITH DATA_COMPRESSION on your hardware.

**Outputs:**

#### Data in scope

**Key:** eligible_gb

**Expr:** db_gb * eligible_pct / 100

**Format:** decimal

#### Space saved per copy

**Key:** saved_gb

**Expr:** eligible_gb * saving_pct / 100

**Format:** decimal

**Primary:** true

#### Database size after compression

**Key:** new_db_gb

**Expr:** db_gb - saved_gb

**Format:** decimal

#### Overall reduction

**Key:** overall_pct

**Expr:** saved_gb / db_gb * 100

**Format:** percent

#### Annual storage saving

**Key:** annual_saving

**Expr:** saved_gb * copies * cost_gb_month * 12

**Format:** currency

**Primary:** true

#### Rebuild time to apply

**Key:** rebuild_hours

**Expr:** eligible_gb / rebuild_gb_hr

**Format:** hours

**Description:** Sequential time. Plan it in maintenance windows and watch log growth.

**Chart:**

#### Annual storage saving versus compression ratio

**Type:** bar

**X:** saving_pct

**From:** 10

**To:** 80

**Steps:** 15

**Series:**

- annual_saving

**Disclaimer:** Compression also uses CPU on reads and writes and can slow write-heavy tables. Page compression is available on SQL Server editions that support it. Test on a restored copy first.

## Content

**Intro:** Page compression can cut the size of large ERP history and transaction tables by a third to well over a half, which shrinks storage, backups and restore time. This calculator turns your database size and expected saving into GB, annual cost and rebuild hours.

**Sections:**

#### How to use it

**Body:** Start with used database size and estimate how much sits in large tables that are read far more than written, such as ledger history, inventory transactions, audit logs and EDI archives. Run sp_estimate_data_compression_savings on a few of them to get a realistic saving percentage, then enter it. Add how many copies of the database you store and your cost per GB. The rebuild rate comes from timing one test rebuild.

**Bullets:**

- Sample the biggest five tables, not the whole database
- Count DR and test copies in the cost
- Measure rebuild speed on a restored copy

#### Row compression versus page compression

**Body:** Row compression stores fixed-length types in a variable-length format and typically saves less. Page compression adds prefix and dictionary compression on each page, which suits repetitive ERP data such as codes, dates and status flags. The cost is CPU when rows are read or modified. Tables that are mostly scanned and rarely updated gain the most. Tables with heavy random updates may be better left alone or given row compression only.

#### Worked example

**Body:** A 1,500 GB database with 70 percent of its data in compressible tables has 1,050 GB in scope. At a 50 percent saving you free 525 GB per copy. With three copies at 10 cents per GB per month, that is about 1,890 dollars a year, plus smaller backups and faster restores. Rebuilding at 60 GB per hour takes around 17.5 hours, which is why you phase it across several maintenance windows.

#### Common mistakes

**Body:** Do not apply compression to everything blindly. Check CPU headroom first, because compression moves cost from disk to processor. Rebuilds are fully logged in full recovery, so size the log and ship log backups often. Finally, new indexes do not inherit the table setting automatically, so include DATA_COMPRESSION in your index scripts.

**Cta:** If you want a read-only scan that ranks your ERP tables by compression benefit and risk, we can run that on your own servers.

**Faq:**

#### How much does page compression usually save?

**Answer:** ERP transaction and history tables commonly save 30 to 70 percent depending on how repetitive the data is. Tables with already compact or encrypted data, or large LOB columns, save far less. Always sample with sp_estimate_data_compression_savings before you decide.

#### Does compression slow my ERP down?

**Answer:** It adds some CPU on reads and writes, but often reduces I/O, which can make scans faster. Write-heavy tables with random updates can slow noticeably. Test with a realistic workload on a restored copy and watch CPU before and after.

#### Is backup compression the same thing?

**Answer:** No. Backup compression shrinks only the backup file. Data compression changes how data is stored in the database itself, reducing disk use, memory use and I/O. The two stack, but the benefit of backup compression is smaller on already compressed data.

#### Can I roll it back?

**Answer:** Yes. You can rebuild with DATA_COMPRESSION = NONE, but it needs another full rebuild window and log space. That is why testing on a copy first matters.

## Search terms

sql server page compression savings, data compression calculator sql server, erp database compression, row vs page compression, sp_estimate_data_compression_savings, reduce erp database size, compression storage cost saving

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
