Comment 21 for bug 1904737

Revision history for this message
Jason Stephenson (jstephenson) wrote :

Testing has so far shown that the cp_available_by_circ_lib_idx is relevant to the pull list query from Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm at least.

Using the new logic, we end up with a parallel seq scans on asset.copy and serial.unit whereas the hard coded status of 0 and 7 to bitmap heap scans on the indexes. The newer logic has consistently taken about 0.5 to 0.8 seconds longer than the logic with hard coded status values on my database with a copy of production data.

I have tried adding an index on config.copy_status where holdable and is_available are true. It makes no difference. It is not used by the new query logic.

I will check the other queries that have so far been modified.

I am not sure if I can come up with a modification to the new logic that will erase the performance degradation.