Re: shredding users

Wallace Reis <[email protected]>
Newsgroups gmane.comp.bug-tracking.request-tracker.devel
Message-ID <[email protected]>
On Jul 17, 2014, at 10:07, Christian Loos <[email protected]> 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

-- 
RT Training - Boston, September 9-10
http://bestpractical.com/training
signature.asc (application/pgp-signature, 455 B)
-----BEGIN PGP SIGNATURE-----

iQEcBAEBAgAGBQJTx85yAAoJEDrzFaM1yUMIBjMIAJXsM+aVKM/o44XpIaOd/ao4
JFcl3qbzDIPUifHCGmulN0Pg9OdGBsMk6wK2mVFcR3nr/pRCOrNB90pufx+/L9sd
6qJjRnFrOMDtZNxtEaeZcxZhJQp5usFsWSSjQI82er3HcGyNVeK1WJtjs+TmEl8X
8BANh8eGhw0R1quKpqPxkXhi3RkzCzhGSWQedJ33J1dTkMXEqPvxCjqEMMKyqolB
twmy5cyke9YlwWjfEH8yT8bbsku8DjkbvppSgZik44dbyS9lU0eK+GYLyDbBn/9L
249pl/y8yKISgJkPl0ZuQu9cWQHXMj+NWXVZovqo1rVgR+aCXqeT8FhkSkB/Q2o=
=l92k
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.