[rt-users] removing deleted tickets from the db

Harald Kapper hk at kapper.net
Tue Jul 5 05:09:06 EDT 2005


On Mon, 4 Jul 2005 17:12:14 -0400, "Brookes, Iris"
<Iris.Brookes at tdsecurities.com> wrote:

>delete attachments where transactionid in (select id from transactions where objecttype like 'RT::Ticket' and objectid in (select effectiveid from tickets where type like 'ticket' and status like 'deleted'));
>--
>delete cachedgroupmembers where groupid in (select id from groups where domain like 'RT::Ticket-Role' and instance in (select effectiveid from tickets where type like 'ticket' and status like 'deleted'));
>--
>delete groups where domain like 'RT::Ticket-Role' and instance in (select effectiveid from tickets where type like 'ticket' and status like 'deleted');
>--
>delete objectcustomfieldvalues where objecttype like 'RT::Ticket' and objectid in (select effectiveid from tickets where type like 'ticket' and status like 'deleted');
>--
>delete transactions where objecttype like 'RT::Ticket' and objectid in (select effectiveid from tickets where type like 'ticket' and status like 'deleted');
>--
>delete tickets where type like 'ticket' and status like 'deleted';

hi
I would love to shrink our rt-database by deleting definitely unwanted stuff
from it - question here: is the above described delete-order confirmed by
someone from bestpractical?

thank you in advance
Harald Kapper, icq# 36178328         http://kapper.net
managing director, owner,            loeblichgasse   6
chief executive officer              1090 vienna,  .at
tel +43 1 3195500-0, fax +43 1 3195502, hk at kapper.net
--------------mark---------------
The following Statement is False.
 The previous Statement is True. 
     - Welcome to my World -     

ps. now running rt-3.4.1 on debian as I got completely stuck on trying to setup
this release on redhat enterprise-linux.



More information about the rt-users mailing list