Moving large attachments outside of MySQL?

Our RT is cluttered with large attachments, slowing down the MySQL engine.

Our hack fix: move these attachments to a webserver and do this on the
Attachments table:

UPDATE Attachments SET Content = ‘’,
ContentType=‘text/html’ WHERE id = attachmentid;

for large attachments.

This helps, but is there a better solution?

We’re just a Bunch Of Regular Guys, a collective group that’s trying
to understand and assimilate technology. We feel that resistance to
new ideas and technology is unwise and ultimately futile.

Maybe somebody’s already done it, but at some point I intend to look
into creating an
extension that takes transactions and stores the attachments on the
filesystem so that
they never see the database. My primary motivation for this is so that
other tools can
then index these documents to make them searchable e.g; OCR PDFs.

No idea whenit’ll happen though.

Cambridge Energy Alliance: Save money & the planet

Kelly,

Why are these attachments slowing MySQL down? Maybe there is an index
that would help. If it is content searches in the attachment, you will
lose valid search results with this approach. Maybe switching to a DB
backend that supports full text indexing would help. Currently, there
is a wiki entry for how to do it with an Oracle backend and I am working
on a similar entry for PostgreSQL. Just some ideas.

Cheers,
KenOn Sat, Oct 11, 2008 at 10:27:14AM -0700, Kelly Jones wrote:

Our RT is cluttered with large attachments, slowing down the MySQL engine.

Our hack fix: move these attachments to a webserver and do this on the
Attachments table:

UPDATE Attachments SET Content = ‘’,
ContentType=‘text/html’ WHERE id = attachmentid;

for large attachments.

This helps, but is there a better solution?


We’re just a Bunch Of Regular Guys, a collective group that’s trying
to understand and assimilate technology. We feel that resistance to
new ideas and technology is unwise and ultimately futile.


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

This helps, but is there a better solution?

No idea about better, but you could use a custom field and then
use its Field Links To functionality to create a link and/or embed
the original resource.

Richard