[rt-users] delete_dead_tickets.pl
Ayan R. Kayal
ayan.kayal at yale.edu
Wed Nov 14 15:17:55 EST 2001
This script is flawed. It has a SQL statement "DELETE FROM Watchers WHERE
Value=?". This statement will delete any queue AdminCcs (and maybe queue Ccs
too) whose userid matches the ticket number that you're deleting. I told
Steve about this, but he dismissed it. The proper SQL statement should be:
"delete from watchers where Scope = 'Ticket' and Value = ?"
O- ~ARK
> -----Original Message-----
> From: rt-users-admin at lists.fsck.com
> [mailto:rt-users-admin at lists.fsck.com]On Behalf Of Greg Dickerson
> Sent: Wednesday, November 14, 2001 1:56 PM
>
> Steve's script saved my ass and my DB :-). Here is a modified
> version of his script to do cleanup on very large MySQL DB's.
>
> Don't forget to add those index's
>
> **** snip sent to Steve ****
> Steve,
> Thank you for putting together the delete dead tickets script. I found
> that on our system (a really slow one) that the script took over
> 24 hours to
> delete 3-4 thousand records so I asked one of our Perl/MySQL
> programmers to
> check out the code. They made the edits you see in the attachment. We also
> added indexes on the tables that matched the where clause. With the edits
> and indexes it rips trough a few thousand records in minutes.
> Hope you will
> find the edit satisfactory.
>
> ******
>
> Here is a link to his original script also.
>
> > http://dev.inet-technologies.com/rt2/
>
>
>
> Greg
> --------
> Greg Dickerson
> Support Manager
> O'Reilly & Associates, Inc.
> 1005 Gravenstein Highway North
> Sebastopol, CA 95472
> Phone:(707)827-7215
>
>
> ----- Original Message -----
> From: "Carles Amigó" <carles at inlander.es>
> To: <rt-users at lists.fsck.com>
> Sent: Wednesday, November 14, 2001 8:29 AM
> Subject: [rt-users] delete_dead_tickets.pl
>
>
> > Where can i find the Steve Poirier's delete_dead_tickets.pl script?
> >
> > I have been looking the list archives, and i want to delete some old
> > tickets to minimize the database size.
> >
> > Thanks
> >
> > _______________________________________________
> > rt-users mailing list
> > rt-users at lists.fsck.com
> > http://lists.fsck.com/mailman/listinfo/rt-users
> >
>
More information about the rt-users
mailing list