@[deleted], what kind of server/db are you running mate, that sounds very slow. What size is your attachments/chunks table? (>10GB?)How big are these tickets? (num attachments, num comments etc) How big are the generated PDFs? (avg)The orphans thing is important for the db, but it's a bit much after each ticket, hence the return true line, you are supposed to put it back afterwards, then delete another ticket manually to remove the now unlinked chunks.It will be slow if you have a slow database/php/filesystem etc.. as it extracts each attached file from the database, saves them to the filesystem, then joins them and the text into a pdf (where attachment is a pdf, merges that into the output).. It was designed to run as low priority system task via cron, not an interactive "fast as you can" app.. but if there is a serious bottleneck, let us know mate! I've basically set-it-and-forgot-it really, it just runs on my server every week no problems. We get less than a thousand tickets a week, so its just those ancient few hundred that need pruning.. Obviously the first time you run it there would be quite a few though. Hmm. Certainly seems to run faster on MySQL 5.5+