[rt-users] Performance issues - deleting attachments?
Ruslan U. Zakirov
cubic at acronis.ru
Tue Sep 23 13:14:56 EDT 2003
WARNING: I have NOT deleted any attachments in my DB.
As I understand it would be OK if you just delete record in Attachments,
but only for real files.
If you are going to do it then check next:
1) Attachments.Filename > ''
2) Noone other row in Attachments have Parent =
id_of_record_you_want_to_delete.
How to find all attachments for Ticket in DB:
select a.TransactionId, a.id as AttachmentId, a.Parent, a.Subject,
a.Filename, a.ContentType from Attachments a, Transactions t, Tickets ti
where t.id = a.TransactionId and t.Ticket = ti.id and ti.id = <ticket_id>;
Good luck. Ruslan.
Barry Byrne wrote:
>Apologies for replying to my own message, but I managed to delete my actual
>question and send the mail without my main question which was:
>
>Does anyone know how to delete some/all attachments from a ticket. I know RT
>doesn't provide a way, but I'd be happy to run the SQL queries to remove
>them if I was more confident in what exactly needed to be done? Has anyone
>successfully tried this?
>
> - Thanks,
>
> Barry
>
>
>>Hi:
>>
>>Using RT 3.0.4 here and having a lot of performance issues, particularly
>>where large attachments are included in a transaction. I'm getting
>>frustrated users who are seing 45 second response times to
>>viewing a ticket
>>which has multiple attachments (perhaps a few MB in total), as opposed to
>>three second times for other tickets.
>>
>>
>>I've added indexes for all fields in the Attachment table except
>>headers and
>>content, and this appears to have helped matters a little,
>>however it would
>>seem to my mind, that keeping all email content parts
>>(attachments and body
>>text) in the one table is very ineffecient, as the entire table
>>needs to be
>>scanned including potentially many MBs or GBs of attachment data that
>>doesn't need to shown. Would it not make more sense to move (actual)
>>attachment to a separate table from non-attachments? Or perhaps even more
>>usefully, store attachments at file level rather than in the DB.
>>Apologies,
>>if I'm totally off base with this the frustration levels are high!
>>
>>In some tickets, I've ended up with the same attachement six or
>>seven times,
>>since the system ran out of swap during the attachment submission, and
>>sendmail temp failed the mail, but RT managed to insert the
>>attachment, and
>>then sendmail tried again a while later - going round in circles!
>>
>>
>>
More information about the rt-users
mailing list