]> git.evergreen-ils.org Git - Evergreen.git/commit
Use top level join instead of subquery in hold queue position query
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 19 Apr 2011 19:56:04 +0000 (19:56 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 19 Apr 2011 19:56:04 +0000 (19:56 +0000)
commit3afcc0dba45400618a3e5566d92c8d032375d369
tree7f221126df26a29d89d25bfee5bdb8396a095d85
parent979096ac7351875a0509143d884f1941009e25cc
Use top level join instead of subquery in hold queue position query

This is more readily optimized by the Postgres planer.

Note also, for very large data sets (lots of holds, on the order of 100k+ active), the following is also advised:

 ALTER TABLE action.hold_copy_map alter column target_copy SET statistics 500, alter column hold set statistics 500;
 ANALYZE action.hold_copy_map;

This gives the planner better data about the hold-copy-map n-distinct.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@20221 dcc99617-32d9-48b4-a31d-7c20da2025e4
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm