Title: Database Shrink
Author: Kriko
Published: Jun 4, 2023
Last modified: Jul 7, 2026

---

 1.  [Home](https://kriko.io/) /
 2.  [Glossary](https://kriko.io/glossary) /
 3.  D Letter

# Database Shrink

**Database shrink** is the process of reducing the physical size of a database data
or log file and returning unused space to the operating system.

Database systems create files of a specified size on a storage device. Part of this
capacity is occupied by active data, while the remaining space may be reserved for
future records and operations.

For example, if a 1 GB database file contains 400 MB of data, it will continue to
occupy 1 GB of disk space. However, the remaining 600 MB is not wasted. The database
can reuse this internal free space when new data is added.

For this reason, the presence of free space within a database file does not automatically
indicate poor performance. Maintaining sufficient free space may reduce the need
for frequent file growth operations.

The **database shrinking process** relocates data pages so that unused space at 
the end of a file can be released to the operating system. In SQL Server, this can
be performed using commands such as DBCC SHRINKFILE or DBCC SHRINKDATABASE. Microsoft
recommends using shrink operations only when necessary.

Database shrinking is generally appropriate after a one-time deletion of a large
volume of data, the completion of a data migration project or a permanent reduction
in storage requirements.

It should not normally be used as a routine maintenance or performance optimisation
method. If the database later requires the released space again, the file will need
to grow, which may consume additional resources and affect performance.

Moving data pages during a shrink operation may cause **index fragmentation**. This
can negatively affect the performance of certain queries and data access operations.
Microsoft advises against unnecessarily shrinking database files to minimise file
fragmentation.

The operation may also consume significant processor, storage and input-output resources.
Shrinking large databases should therefore be planned outside periods of heavy system
activity.

Database shrink does not automatically remove unused records, extensions or database
objects. Data deletion, archiving and retention management are separate processes.
Shrinking only releases physical file space that has already become unused.

Before performing the operation, administrators should confirm that a current **
database backup** is available. After the process has been completed, index fragmentation,
file sizes, free-space levels and query performance should be reviewed.

In summary, database shrink is not a routine optimisation technique. It is a controlled
database administration operation used to reclaim disk space under specific circumstances.

## Discover it in the dictionary

###  Google Analytics

Google Analytics is a Google analytics platform used to measure, analyse and report
user interactions on websites and mobile applications. Its standard version can…

###  SWOT Analysis

SWOT analysis is a strategic analysis method used to evaluate the strengths, weaknesses,
opportunities and threats of a person, organisation, brand or business. The…

###  Google Index

Google Index is the index system that contains web pages Google has discovered, 
crawled, processed and evaluated for potential display in search results. For…

###  Long-tail Keyword

A long-tail keyword is a keyword type that addresses more specific search intent.
It usually consists of more words, has lower search volume and…

###  Session

A session is a technical concept that refers to the period of interaction between
a user and a website or application. In web development,…

###  Search Engine Results Page (SERP)

SERP stands for Search Engine Results Page. It refers to the results page shown 
when a user enters a query into Google, Bing, Yandex…

###  Debrief

A debrief is an evaluation and feedback meeting held after a brief to check whether
the information has been understood correctly, clarify uncertain points…

###  Cost Per Click (CPC)

CPC stands for “Cost Per Click” and refers to the cost per click in digital advertising.
It is an important performance metric that shows…

###  Data Mining

Data mining is an analytical approach used to discover meaningful patterns, relationships
and trends within large datasets. It helps transform raw information into insights…

## Track the digital heartbeat  with Kriko

Subscribe to receive curated insights, news, and ideas shaping the digital landscape.

  By checking this box, you acknowledge and accept our [privacy policy](https://kriko.io/privacy-policy).