diff options
author | Gareth Rees <gareth@mysociety.org> | 2015-04-21 16:07:35 +0100 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2015-04-27 16:17:11 +0100 |
commit | b62d81b80016c9046e19fb10e28c07a5514b3095 (patch) | |
tree | 7a0336f4f6bcb14b6dd0959105772b72e1d38076 /lib/attachment_to_html/view.rb | |
parent | 578a658bd1988ec23bfb5f3c2cc173bab20d76ba (diff) |
Only load the outgoing messages that will be used
Prevents loading of all outgoing messages related to the info request.
Before
OutgoingMessage Load (1.5ms) SELECT "outgoing_messages".* FROM
"outgoing_messages" WHERE "outgoing_messages"."info_request_id" = 137
ORDER BY created_at
After
OutgoingMessage Load (0.8ms) SELECT "outgoing_messages".* FROM
"outgoing_messages" WHERE "outgoing_messages"."info_request_id" = 137
ORDER BY created_at LIMIT 1
Diffstat (limited to 'lib/attachment_to_html/view.rb')
0 files changed, 0 insertions, 0 deletions