[rt-users] Huge Attachments.MYD file

Robin Lee Powell rlpowell at digitalkingdom.org
Mon May 6 13:21:34 EDT 2002


On Mon, May 06, 2002 at 11:46:58AM -0500, Duane Waddle wrote:
> At 5/1/2002 10:37 AM, you wrote:
> 
> >I don't know if there's an easy way to search for this (there isn't
> >in the web application, but maybe through your database there's an
> >easy query).
> 
> Using RT 2-0-13 w/ MySql.. try this query.  Should give you all
> attachments and the ticket # associated, sorted by attachment size.
> 
> select b.Ticket,a.Filename,length(a.Content) as attachsz from
> Attachments a, Transactions b where a.TransactionId=b.id and
> length(a.Content) is not null order by attachsz desc;
> 
> 
> Now the kicker here is that you'll know where the pigs in your
> database are --   but is there a clean and easy way to delete them?
> My present guess is there is not.  (Clean and easy here refer to a
> technique that RT would provide and Jesse wouldn't frown on.)

Betcha could replace them with something of very small length (like the
string 'deleted').

-Robin

-- 
http://www.digitalkingdom.org/~rlpowell/ 	BTW, I'm male, honest.
le datni cu djica le nu zifre .iku'i .oi le so'e datni cu to'e te pilno
je xlali -- RLP 				http://www.lojban.org/




More information about the rt-users mailing list