PrestaShop Database Stats Cleaning
PrestaShop Database Stats Cleaning
PrestaShop Database Stats Cleaning
PrestaShop Database Stats Cleaning

Product safety and resources

Manufacturer / EU Responsible Person

Production information includes the address and related information of the product manufacturer.

Tecnoacquisti.com

Via Santa Croce sull'Arno 9

00148

Roma

Italia

Roma

Sales activity compliant with EU laws and regulations

Economic operator based in the EU ensuring product compliance with required regulations.

Arte e Informatica di Loris Modena e c. s.a.s.

Via Santa Croce sull'Arno 9

00148

Roma

Roma

Italia

P.IVA e CF: 13213161006

REA: RM - 1430113

shop@tecnoacquisti.com

(+39) 06 94379478

The most authentic testimony to the quality of Tecnoacquisti.com comes from our customers. We invite you to explore our ecommerce portfolio in PrestaShop to discover the excellence of our work.

PrestaShop Database Stats Cleaning

Compatibility
Compatibility: PrestaShop 1.7.X / 8.X, PrestaShop 9
DB-CLEANING
€0.00

Module for cleaning and optimizing PrestaShop database: deletes obsolete statistical data (connections, connections_page, connections_source, pagenotfound, guest, statssearch, log) and orphan rows in a secure and controlled way. It offers dry-run mode, block (batch) deletions, TRUNCATE option with DELETE fallback, protection via secure_key for cron, and configuration interface in Back Office.

GitHub

Module available on GitHub

Rating:
(0)
Available in:
Version: 1.0.5 (17/12/2025)

Description

PrestaShop Module: Tec Datacleaning - Safe cleaning of database statistics

Tec Datacleaning is a module for PrestaShop 1.7+ designed to securely and programmatically manage the cleaning of database tables that contain statistical data about your e-commerce business, such as connections, page views, guest visitor records, 404 pages, internal searches, and other metrics.

Goal of the module

Over time, statistical tables such as connections, connections_page, guest or statssearch can grow tremendously, slowing down database maintenance operations and affecting overall performance. Tec Datacleaning provides reliable tools to remove obsolete or unnecessary data without risking database integrity.

Key features

  • Support for automatic cron - allows periodic cleanups to be scheduled via cron endpoint authenticated using a secure key.
  • "Fast Cleanup" mode with TRUNCATE - fast cleanup option that empties selected statistical tables entirely when allowed by database permissions.
  • Secure Fallback with batch DELETE - if the TRUNCATE operation is not possible (e.g., due to foreign key constraints or permissions), the module performs configurable batch deletions to avoid blockages.
  • "Dry run "preview mode - allows to see how many rows would be deleted without actually performing the operation, useful to avoid accidental deletions.
  • Configuration interface in the Back Office - selection of tables to be cleaned, setting of retention months, definition of batch size and display of secure key.

Secure operation management

The module clearly highlights that TRUNCATE and DELETE are destructive operations. Before performing them, it is recommended to:

  • perform a dry run to view the affected data;
  • perform a full backup of the database.

These precautions are essential to maintain data integrity and prevent accidental deletions. :contentReference[oaicite:6]{index=6}

Configuration in the Back Office

The configuration section allows you to:

  • view or set the secure key for the cron endpoint;
  • select which statistical tables to include in cleanup operations;
  • define how many months of data to retain before deletion;
  • configure the batch size for DELETE deletions in case of fallback.

Using the Cron Endpoint

The module exposes a cron endpoint accessible via URL authenticated by the secure key:

https:///module/tec_datacleaning/cron?secure_key=

This allows statistics cleanup to be integrated within external scripts or automation services.

Technical Requirements

  • PrestaShop version 1.7 or higher (also compatible with PrestaShop 8/9).
  • Appropriate permissions for DELETE operations in the database.
  • High permissions for TRUNCATE operations, often blocked by constraints or restrictions.

Usage tips

To ensure efficient and safe cleanups:

  • launch the module in "dry run" mode before final actions;
  • schedule cleanups at low traffic times;
  • restrict access to the cron endpoint, for example by IP whitelisting.

Conclusion

Tec Datacleaning is an effective tool for keeping your PrestaShop store's statistical data archive optimized and under control. It offers secure and flexible automation options for periodic cleaning, with intelligent fallbacks for database-constrained environments.

Product Details

Compatibility
PrestaShop 1.7.X / 8.X
PrestaShop 9
Product added to wishlist