---
title: "Truncating a large database table"
date: "2025-02-06T00:02:23+00:00"
summary:
image:
type: "article"
url: "/acquia-cloud-platform/help/93971-truncating-large-database-table"
id: "d86fab08-b85c-4aff-ac34-a38677332c35"
---

Issue
-----

One or more tables in your database are too large and need to be reduced in size. For information on assessing your disk space usage see [About disk storage in Cloud Platform](/node/56364).

Resolution
----------

Before attempting to reduce the size of any database, it is important that you make a backup as is best practice. For more information, visit [Backing up your Drupal database](/acquia-cloud-platform/help/92601-backing-your-drupal-database "Backing up your Drupal database"). 

After you have backed up the database, you could use the following command to connect to your database, replacing `[site-uri]` with the base URL to the website you want to connect to:

    drush sqlc --uri=[site_URL]

Important

Make sure to include the URI flag (especially if you have a multisite application) to ensure that you are connecting to the correct database. For example:

    drush sqlc --uri=www.acquia.com

Now that you have a backup, are connected to the correct DB and know which table needs to be truncated (table\_name), run the following command:

    TRUNCATE TABLE table_name;

For example, if the table you needed to truncate was cache\_container.idb, you would run this command

    TRUNCATE TABLE cache_container;

For more information on truncating a table, please see [Managing Large Cache Render tables in Drupal 8](/node/93856), which outlines how to truncate the cache\_render table in particular, for Drupal 8.