Hold queue position query speed could be improved, without loss of functionality

Bug #1119505 reported by Mike Rylander
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
2.3
Fix Released
Medium
Unassigned

Bug Description

From the commit implementing such an improvement:

 In several interfaces, we use a server side method which gathers statistics
 about a hold: related holds, it's position in the (approximate) queue, the
 estimated wait time, etc. Within this method is a relatively complicated
 json_query that returns the list of related, (FIFO-ish) sorted holds -- ones
 that could be filled by a copy which could fill the hold in question. This
 commit restructures that query so as to make it faster when the list of
 related holds is large, by removing duplicate (cartesian product, actually)
 hold ids that were being fed into an INNER JOIN clause.

 Testing shows a speed increase of 4x for related-hold queue of around 675
 holds [~2s -> ~0.5s] on a relatively large Evergreen installation,
 appropriately tuned. The speed improvement gets larger with longer queues.
 There is no observed decrease in speed for smaller queue sizes.

You can find this at http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/miker/hold-queue-speedup

Tags: pullrequest
description: updated
Ben Shum (bshum)
Changed in evergreen:
milestone: 2.3.4 → 2.4.0-alpha
status: New → Triaged
Revision history for this message
Ben Shum (bshum) wrote :

Picked to master and rel_2_3

Changed in evergreen:
status: Triaged → Fix Committed
Ben Shum (bshum)
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.