[rt-devel] shredding users

Wallace Reis wreis at bestpractical.com
Thu Jul 17 09:23:20 EDT 2014


On Jul 17, 2014, at 10:07, Christian Loos <cloos at netcologne.de> wrote:
> Hi,
> 
> shredding users, the longest database part was this query:
> SELECT main.* FROM Attachments main  WHERE (main.Creator = '123')  ORDER
> BY main.id ASC
> 
> Beside maybe mentioning an index on Attachments.Creator for shredder and
> maybe omit the sorting, wouldn't it be better to "SELECT main.id FROM
> Attachments ..." which wouldn't send the Content column?

Hi,

It depends on the RT instance you have. Have you analysed the query plan of original query? How about the proposed solutions?
Without looking at that, it sounds like that the first two things you suggested about the index and sorting would provide way more gain than just removing columns from the retrieval list if it’s for a RT instance where attachments are basically small (about a few hundreds of KB).

Cheers,

--
Wallace Reis/wreis
Software Engineer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.bestpractical.com/pipermail/rt-devel/attachments/20140717/335ff7d3/attachment.pgp>


More information about the rt-devel mailing list