<commit_before>.. Licensed under the Apache License, Version 2.0 (the "License"); you may not
.. use this file except in compliance with the License. You may obtain a copy of
.. the License at
..
..   http://www.apache.org/licenses/LICENSE-2.0
..
.. Unless required by applicable law or agreed to in writing, software
.. distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
.. WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
.. License for the specific language governing permissions and limitations under
.. the License.

.. _compact:

==========
Compaction
==========

The `compaction` operation is the way to reduce disk space usage by removing
unused and old data from database or view index files. This operation is very
similar to the `vacuum` (`SQLite`_ ex.) operation available for other database management
systems.

.. _SQLite: http://www.sqlite.org/lang_vacuum.html

During compaction of the `target` CouchDB creates new file with the ``.compact``
extension and transfers only actual data into. Because of this, CouchDB checks
first for the available disk space - it should be *twice greater* than the
compacted file's data.

When all actual data is successfully transferred to the `compacted` file CouchDB
replaces the `target` with the `compacted` file.

.. _compact/db:

Database Compaction
===================

Database compaction compresses the database file by removing unused file<commit_msg>Fix line length to make check passes<commit_after>.. Licensed under the Apache License, Version 2.0 (the "License"); you may not
.. use this file except in compliance with the License. You may obtain a copy of
.. the License at
..
..   http://www.apache.org/licenses/LICENSE-2.0
..
.. Unless required by applicable law or agreed to in writing, software
.. distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
.. WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
.. License for the specific language governing permissions and limitations under
.. the License.

.. _compact:

==========
Compaction
==========

The `compaction` operation is the way to reduce disk space usage by removing
unused and old data from database or view index files. This operation is very
similar to the `vacuum` (`SQLite`_ ex.) operation available for other database
management systems.

.. _SQLite: http://www.sqlite.org/lang_vacuum.html

During compaction of the `target` CouchDB creates new file with the ``.compact``
extension and transfers only actual data into. Because of this, CouchDB checks
first for the available disk space - it should be *twice greater* than the
compacted file's data.

When all actual data is successfully transferred to the `compacted` file CouchDB
replaces the `target` with the `compacted` file.

.. _compact/db:

Database Compaction
===================

Database compaction compresses the database file by removing unused file
{'fraction_non_alphanumeric': 0.09335604770017036, 'fraction_numerical': 0.00272572402044293, 'mean_word_length': 4.233511586452763, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2206021', 'n_tokens_mistral': 758, 'n_tokens_neox': 722, 'n_words': 395}