15902: Adjust order to avoid poorly optimized query.
authorTom Clegg <tom@tomclegg.ca>
Tue, 28 Jan 2020 20:05:02 +0000 (15:05 -0500)
committerTom Clegg <tom@tomclegg.ca>
Tue, 28 Jan 2020 20:05:02 +0000 (15:05 -0500)
commit9fc2ff5583fc31c9f75f80dcf7258bed63084568
treec5273479bc694e5d6f7bf057468266076d2571de
parentc88bd2141126b4d912ddb7f97774570ca81e6688
15902: Adjust order to avoid poorly optimized query.

When many requesting_container_uuid values are passed in this query,
the default order (["modified_at desc", "uuid"]) sometimes causes
PostgreSQL to begin with the timestamp index, which results in a slow
query. The requesting_container_uuid index makes the query much
faster.

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@tomclegg.ca>
apps/workbench/app/models/container_work_unit.rb