I have a queue with over 15K spam messages in it, and I want to delete
every one of those messages. Using the bulk update for this really
isn’t feasible at 100 per page, and the browser runs out of memory if
I do unlimited.
There are no other tickets in the queue, so I thought this might be a
chance to just do some SQL queries directly on the database. But I
want to be as safe about it as I can be. I can do a query like this:
update tickets set status = ‘deleted’ where queue = 42
(42 is the numeric id of the queue in question)
But this dosnt update the transactions table. Is that safe? It also
seems kind of wasteful to keep all that data around when we have no
need for it, so removing things from the attachments table popped into
my head, but I wasnt sure how good of an idea that was either.
Has anyone ever had to deal with this? Whats the best way to move forward?
Jay
-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of
Sent: Tuesday, January 23, 2007 4:00 PM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Mass Delete
I have a queue with over 15K spam messages in it, and I want to delete
every one of those messages. Using the bulk update for this really
isn’t feasible at 100 per page, and the browser runs out of memory if
I do unlimited.
There are no other tickets in the queue, so I thought this might be a
chance to just do some SQL queries directly on the database. But I
want to be as safe about it as I can be. I can do a query like this:
update tickets set status = ‘deleted’ where queue = 42
(42 is the numeric id of the queue in question)
But this dosnt update the transactions table. Is that safe? It also
seems kind of wasteful to keep all that data around when we have no
need for it, so removing things from the attachments table popped into
my head, but I wasnt sure how good of an idea that was either.
Has anyone ever had to deal with this? Whats the best way to
move forward?
Jay
Jay,
If you actually want to remove the data from the database, check out
RTx::Shredder (Request Tracker Wiki).
Always be wary of using SQL directly to do updates in RT - you may break
something. It’s useful to learn the RT API and do updates using a perl
script, rather than using SQL.
Steve
Stephen Turner
Senior Programmer/Analyst - Client Support Services
MIT Information Services and Technology (IS&T)
Hi,
like stephen said, use rtx-shredder and do this from the CLI, this is
faster, much faster 
Torsten2007/1/23, slushpupie@gmail.com slushpupie@gmail.com:
I have a queue with over 15K spam messages in it, and I want to delete
every one of those messages. Using the bulk update for this really
isn’t feasible at 100 per page, and the browser runs out of memory if
I do unlimited.
There are no other tickets in the queue, so I thought this might be a
chance to just do some SQL queries directly on the database. But I
want to be as safe about it as I can be. I can do a query like this:
update tickets set status = ‘deleted’ where queue = 42
(42 is the numeric id of the queue in question)
But this dosnt update the transactions table. Is that safe? It also
seems kind of wasteful to keep all that data around when we have no
need for it, so removing things from the attachments table popped into
my head, but I wasnt sure how good of an idea that was either.
Has anyone ever had to deal with this? Whats the best way to move forward?
Jay
The rt-users Archives
Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com
Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com
MFG
Torsten Brumm
http://www.torsten-brumm.de