[rt-users] Find ticket numbers of tickets with large attachments

Remy van Elst relst at relst.nl
Thu Jan 17 08:35:45 EST 2013


Hy Rus,

Tried some more stuff, now it is working. Thanks!

The Query:

mysql> SELECT DISTINCT Transactions.ObjectId,Attachments.Subject FROM
Attachments LEFT OUTER JOIN Transactions ON Transactions.Id =
Attachments.TransactionId WHERE Transactions.ObjectType = 'RT::Ticket'
AND LENGTH(Attachments.Content) > 4000000;

Written it down for other people who might have the same problem:

https://raymii.org/s/tutorials/RT_find__and_delete_big_attachments.html

Sincerely,



More information about the rt-users mailing list