Deleting dead tickets (especially attachments)

Hi,

About a year ago there was a reference on the list to a perl script for
removing data from the database for dead tickets – unfortunately, it
looks like the web site where that was hosted, and perhaps the company
itself, no longer exist.

Does anyone have a copy? Or, does anyone have a good reference to the
location of a script/tool for pruning garbage out of a somewhat bloaty
feeling MySQL database?

As of last night to this morning I’ve noticed that adding new data to
the database takes an unreasonable amount of time – seconds to minutes,
through the command line tool, so not an Apache/mod_perl problem this
time. My hunch is that the thousands of copies of viruses we’re storing
in our 604112148 byte Attachments.MYD may have something to do with
this.

I’m not entirely comfortable in SQL yet, so any help would be
appreciated on doing this right; ideally I’d like to completely delete
dead tickets older than X days, or something convenient like that…

Thanks,

Scott A. McIntyre

Scott A. McIntyre:

About a year ago there was a reference on the list to a perl script for
removing data from the database for dead tickets – unfortunately, it
looks like the web site where that was hosted, and perhaps the company
itself, no longer exist.

Does anyone have a copy?

Yep. It’s attached.

“Irrigation of the land with seawater desalinated by fusion power is ancient.
It’s called ‘rain’.”
– Michael McClary, in alt.fusion

cleanup-dead (1.81 KB)