Find orphaned rows and leftover data in the database
You learn what is bloating your shop's database before anyone deletes anything.
What it replaces: half a day of database investigation
What you write to Claude
„find orphaned rows: product_lang/product_shop/image rows without a product, tables of uninstalled modules, oversized connections/guest/log tables. report sizes, don't delete anything”
The problem
The database grew to several GB and the back office is slow. I suspect leftovers from deleted products and old modules.
What Claude does
- Claude measures the database and finds leftovers from deleted products and old add-ons.
- It reports sizes and a suggested clean-up order.
- Any deletion is a separate step, tried on a test copy first.
What you get
A size and orphan report for the database. Nothing is deleted by this use case.
You stay in control
Claude only reads. Nothing in your shop changes. This deep access uses the separate, extra-protected connection and works only for the few hours you switch it on.
Related use cases
- Fix data in bulk, tried on a test copy first
- Report products that haven't sold in 12 months
- Remove an add-on you no longer use, safely
For developers
- Area
- 5 · Service mode
- Connector
- service connector
- In the free Audit
- no, paid version only
- For
- Developer
- Tools
- ps_db_query, ps_list_modules, ps_check_shop_health, ps_db_execute
Step by step
- Runs read-only SELECTs with ps_db_query on information_schema (table sizes) and core tables (service mode).
- Matches table prefixes with installed modules from ps_list_modules.
- Counts orphans (e.g. product_lang rows without a product). Customer tables such as connections and guest follow the customer-data level: with data off, only their size from information_schema is reported.
- Reports table sizes, orphan counts and a suggested clean-up order. Any DELETE is proposed separately with ps_db_execute (single-table, row backup, max_rows) and runs on staging first after your approval.
Safety
Service mode (block 5) works only through the service connector (separate token, allowlisted IP addresses) and only while its time-limited switch is on (1, 4, 8 or 24 h); then it switches itself off, and the owner gets an e-mail when it is switched on. ps_db_query runs one statement in a read-only transaction and returns at most 200 rows, with e-mails, phones and IPs masked. Staff, permission, configuration and connector tables are blocked. Tables with customer personal data (orders, addresses, carts and similar, detected by their columns, also in third-party modules) follow the customer-data level set by the owner: off (blocked), pseudonymised (personal columns masked; only plain columns and COUNT/SUM/AVG, no aliases, functions, UNION or WITH) or full for 1-24 h with a stated purpose.
Last updated: 2026-10-05