[rt-users] Performance with many attachments and transactions
Kevin Murphy
murphy at genome.chop.edu
Mon Nov 28 13:00:59 EST 2005
Kevin Murphy wrote:
> In my case, Vivek is right. The file attachments seem to be sent to
> RT from the database even when they are not displayed.
Looking at the database log, I can see that it is only the text/plain or
text attachments whose content is automatically queried by RT. The
content of binary files is not automatically fetched:
SELECT DISTINCT main.id AS id, main.filename, main.Content AS content,
main.ContentType AS contenttype, main.TransactionId AS transactionid,
main.ContentEncoding AS contentencoding
FROM Attachments main, Transactions Transactions_1, Tickets Tickets_2
WHERE ((Tickets_2.EffectiveId = '1717'))
AND ((Transactions_1.ObjectId = Tickets_2.id))
AND ((Transactions_1.ObjectType = 'RT::Ticket'))
AND ((main.ContentType = 'text/plain') or (main.ContentType LIKE
'message/%') or (main.ContentType = 'text'))
AND ((main.TransactionId = Transactions_1.id));
For my users, it makes sense never to display the contents of named file
attachments unless the user requests one by accessing the content link
for an attachment. And of course, if attachment content is not
displayed, it should really not be fetched from the database. RT's
above database behavior seems to reflect its historical preference for
displaying all text/plain and text file attachments in-line (a
preference that I don't think makes much sense -- why should textual
file attachments be treated any differently than binary?)
I guess this is not an issue for most people, because most users of RT
deal mostly in binary file attachments.
However, we are a bioinformatics research lab, and we deal in a lot of
large tab-delimited and other text files.
I try to educate my users to only upload compressed versions of text
files (which is also preferable for other reasons), but I'd rather see
RT modified to not fetch content if it knows that it doesn't need to
display it.
Thanks,
Kevin Murphy
More information about the rt-users
mailing list