Magento 2 Experts — Hyvä Theme, Tailwind CSS & SEO from a Single Source ›

Magento 2 Database Cleanup with Retention Periods and Dry Run

Magento 2 Extension Hyvä Ready Magento 2.4.x

SKU: DBTABLECLEANUP1

  • tidy up log, report and session tables with periods
  • dry run shows rows and storage in advance
  • delete in batches, business data locked
  • schedule via cron, log and permissions in the admin
Auf Lager
€99.00

Einmaliger Kauf · inkl. 12 Monate Updates · zzgl. MwSt.

No download, but personal setup

No download, but personal setup. This product is not a downloadable software package for self-installation. With your order, you commission Mironsoft to individually set up this module in your shop. We will get in touch with you within 2 business days — we'll sort out the details and payment together then.

This offer is aimed at business owners and companies running a Magento 2 shop.

6 Features

Magento 2 Database Cleanup: tidy up log, report and session tables

With the Mironsoft Magento 2 Database Cleanup you keep technical tables lean that grow with every visit: visitor logs, report indexes, cron entries, admin sessions and old search queries. Each table gets a retention period, a dry run shows the number of affected rows in advance, and deletion happens in small batches that do not block the shop. Orders, customers and catalog data are explicitly excluded.

Approved tables

Only a fixed list of technical tables can be selected, sales and customer data are locked.

Retention period

For each table you set in days how long entries stay before they are deleted.

Dry run

A preview shows in advance how many rows and how much storage would be freed per table.

Delete in batches

Deletion runs in small steps with pauses so that locks and replication lag do not occur.

Schedule via cron

Runs at night or on weekends, with a limit for runtime and row count.

Log and permissions

Every run is logged with row counts, the ACL controls preview, start and settings.

Why clean up

Why a Magento 2 Database Cleanup saves storage and speed

With every visit, every product view and every cron run Magento writes rows into technical tables. After a year, visitor logs and report tables often hold millions of entries that nobody evaluates any more. That lengthens backups, bloats their size and slows down queries that touch these tables. The built-in cleaning jobs cover only a part.

A Magento 2 Database Cleanup tidies up exactly where it is safe and leaves everything else untouched. You define the periods, see the effect in advance and keep a log. The database stays small without anyone running SQL commands by hand.

01Tables and periods

Magento 2 Database Cleanup: choose tables and set retention periods

The list of the Magento 2 Database Cleanup shows the approved tables with current row count and size. For each table you set the retention period, for example ninety days for visitor data or thirty for sessions. Which table may keep data for how long also depends on your data protection periods, the legal review is up to the shop operator. Tables that are not activated are never touched.

  • Row count and size per table visible
  • Period in days per table
  • Only explicitly activated tables
Admin › System › Database Cleanup
customer_visitor (example)90 days
report_event (example)60 days
cron_schedule (example)14 days
Database Cleanup › Preview
customer_visitor1.2 million rows (example)
report_event480,000 rows (example)
Dry run, nothing was deleted
02Dry run

Preview before deleting: rows and storage per table

The dry run counts which rows have exceeded the period and estimates the storage that would be freed. Nothing is deleted. You see the numbers per table and can decide whether the periods fit. At the first Magento 2 Database Cleanup the preview often shows surprisingly large amounts, which can be removed in stages.

  • Count and storage estimate without deleting
  • Numbers per table at a glance
  • Deletion in stages possible
03Delete in batches

Gentle deletion: batches, pauses and runtime limit

Large deletions at once block tables and burden replication. That is why the Magento 2 Database Cleanup works in batches of a few thousand rows with a short pause in between. A runtime limit ends the job cleanly even if rows remain. The next run continues there. The database stays usable for the shop meanwhile.

  • Batch size and pause adjustable
  • Runtime limit per run
  • Next run continues
Configuration › Database Cleanup › Batch run
Batch size
5,000 rows (example value)
Pause
200 ms
Maximum runtime
20 minutes
Admin › System › Cleanup log
Sun 03:00 (example)2 tables cleaned
customer_visitordeleted: 310,000
Email on errors active
04Schedule and log

Schedule, log and permissions for controlled operation

Via cron you decide when the Magento 2 Database Cleanup runs, for example Sundays at three in the morning. Every run appears in the log with table, deleted rows and duration. Errors trigger an email to the tech team. The ACL separates viewing, preview and start so that not everyone on the team may delete. The run can also be started with a console command.

  • Schedule via cron
  • Log with rows and duration
  • ACL separate for preview and start
Use cases

Where the Magento 2 Database Cleanup helps in daily work

Typical situations in which lean tables save time and money.

Backup takes too long

The backup grows from week to week. After a Magento 2 Database Cleanup the database shrinks and the backup runs through much faster.

Slow reports and queries

Report tables with millions of rows slow down evaluations. With retention periods they stay small and respond quickly again.

Moving to a smaller hosting plan

Before a move or a capacity limit you clear technical leftovers without touching business data.

Data protection and retention periods

Visitor data should not sit around indefinitely. Fixed periods make this traceable, the review stays with the shop operator.

Comparison

Magento 2 Database Cleanup: without and with the module

The difference to manual SQL commands and the standard jobs.

TopicWithout the moduleWith Mironsoft DB Table Cleanup
ScopeOnly a few standard jobsSeveral technical tables with periods
PreviewNoneDry run with rows and storage
SafetyA SQL error deletes the wrong dataFixed list, business data locked
LoadLarge deletions blockBatches with pauses
EvidenceNoneLog per run
Setup

How we set up the Magento 2 Database Cleanup for you

The process after your order.

1

Assessment

We look at your largest technical tables and discuss which periods fit your operation.

2

Installation

We install the module, activate the chosen tables and set up the Magento 2 Database Cleanup with batch size and pause.

3

Dry run

We run only previews first and check the numbers with you before anything is deleted.

4

First run

We start the deletion in stages under observation, with a fresh backup beforehand.

5

Handover

Your team receives the schedule, the log and an introduction to the settings.

Scope

Scope compared with the standard log cleaning and the action log

Magento ships a log cleaning for some visitor and log tables that you switch on in the configuration. It covers neither all report tables nor cron entries or sessions and offers no dry run. The Magento 2 Database Cleanup adds periods per table, a preview and a log to this function.

The Mironsoft admin action log documents changes by users and is not emptied automatically. All modules can be combined, and the interface needs no additional JavaScript library.

05How the purchase works

No download, but a personal setup

The Magento 2 Database Cleanup is not listed here as a finished download file for self-installation. The purchase is a commission: we contact you after the purchase, install the module in your shop and agree tables, periods and schedule with you.

Important to know

Your purchase does not include a download link. We will get in touch with you within 2 business days — we'll sort out the details and payment together then. This offer is aimed at business owners and companies running a Magento 2 shop.

FAQ

Frequently asked questions

Everything important about tables, periods, safety and how the purchase works.

How can I clean the database in Magento 2?
With the Magento 2 Database Cleanup you select approved technical tables, set periods and first start a preview, then the deletion in batches.
Which tables can be cleaned?
Technical tables such as visitor logs, report indexes, cron entries, admin sessions and old search queries. We define the exact list with you during setup.
Are orders or customers deleted?
No. Sales, customer and catalog tables are locked and cannot be selected.
Can I see in advance what will be deleted?
Yes. The dry run shows the number of rows per table and the storage that would be freed, without deleting anything.
Does the deletion block my shop?
No, the module deletes in small batches with pauses and ends the run when the runtime limit is reached.
How often should I clean up?
Many shops choose a weekly run at night. The right period depends on your traffic and your retention requirements.
Does the Magento 2 Database Cleanup work with Hyvä?
Yes. The module works in the admin and the database and is independent of the frontend theme.
Do I need a backup beforehand?
We recommend a current backup before the first run, as with any larger change to the database.
How does it differ from the standard log cleaning?
The Magento 2 Database Cleanup covers more tables, knows periods per table, offers a dry run and writes a log.
Can I download and install the module myself?
No. This offer is not a download product. After the purchase we install and configure the module for you personally in your shop.
Write Your Own Review
You're reviewing: Magento 2 Database Cleanup – Mironsoft DB Table Cleanup
loader
Loading...

You submitted your review for moderation.

This form is protected by reCAPTCHA - the Google Privacy Policy and Terms of Service apply.

Magento 2 Database Cleanup – Mironsoft DB Table Cleanup

Magento 2 Database Cleanup – Mironsoft DB Table Cleanup

€99.00