Drupal is a registered trademark of Dries Buytaert
Release: Drupal 10.3.6 Update released for Drupal core (10.3.6)! Release: Drupal 11.0.5 Update released for Drupal core (11.0.5)! Release: Drupal 10.2.9 Update released for Drupal core (10.2.9)! Release: Drupal 10.2.10 Update released for Drupal core (10.2.10)! Release: Drupal 10.3.7 Update released for Drupal core (10.3.7)! Release: Drupal 11.0.6 Update released for Drupal core (11.0.6)! Release: Drupal 10.3.8 Update released for Drupal core (10.3.8)! Release: Drupal 11.0.7 Update released for Drupal core (11.0.7)! Module Revived: Translation Management Tool 8.x-1.19 Module tmgmt updated after 7 months of inactivity (8.x-1.19). Usage Milestone: Account field split Module account_field_split crossed 10,000 active installs.

This module takes inspiration from this Stack Overflow answer, to the question of "How can one quickly truncate an enormous database table?" It uses an approach of creating a new version of an existing table, renaming the tables, and then dropping the old table entirely. e.g.

CREATE TABLE new_foo LIKE foo;

RENAME TABLE foo TO old_foo, new_foo TO foo;

DROP TABLE old_foo;

In a Drupal context, this can be useful if you have a cache table which has become inordinately large, such as a case might be if you've had some poorly behaving bots stuck crawling search pages with facet links.

Features

On installing the module, you will have a new tab in the /admin/config/development/performance/ page, titled "Cache Table Rebuild." This page will list all of your cache tables, and their current size. Clicking on the "Rebuild" operation will perform the steps described above, resulting in a new, identical, empty table. Note, the operation will fail if some other process has a lock on the table in question, such as a back up process running at the same time. You will either need to wait for the backup to complete, or kill the process before rebuilding the table.

If you are using this module because of extremely large tables, then it is likely that the backup process might be failing anyway. In these cases, you can display the running process list by:

show full processlist;

And then kill the processs:

KILL <pid>;

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Dec 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Core Release date
1.0.0 Stable Dec 2, 2024