Optimize database after using rtx-shredder

When we migrated from 3.2.x to 3.6.1 I cleared out roughly 15,000 users created
by spam and a comparable number of tickets. I now have in place a script which
does this automatically and, considering we get about 100-150 emails a day which
are deemed to be spam, this leaves us with quite a few holes in our database.

I was looking into optimization to clean things up a bit but read that doing so
might require rebuilding indexes. As the indexes are created when the database
is built at installation, I don’t think it would be wise for me to run an
optimization which will leave me lacking these key items.

Does anyone have any insight as to whether or not optimization will mess with
things too much?

Thanks
Mathew
Keep up with me and what I’m up to: http://theillien.blogspot.com

Hello, Mathew.

When we migrated from 3.2.x to 3.6.1 I cleared out roughly 15,000 users created
by spam and a comparable number of tickets. I now have in place a script which
does this automatically and, considering we get about 100-150 emails a day which
are deemed to be spam, this leaves us with quite a few holes in our database.

I was looking into optimization to clean things up a bit but read that doing so
might require rebuilding indexes. As the indexes are created when the database
is built at installation, I don’t think it would be wise for me to run an
optimization which will leave me lacking these key items.

Does anyone have any insight as to whether or not optimization will mess with
things too much?

Which DBMS are you using?
If you use PostgreSQL, there is ‘VACUUM FULL ANALYZE’ option (I/O | RAM expensive, though…). It is described in postgres manual.
There’s also CLUSTER or CLUSTER INDEX command in pgsql, it does reorder your data physically on the underlying storage.
However, data get messed again during normal database usage (inserts, deletes, updates…)

If you aren’t using PostgreSQL, you probably should :slight_smile: