]> git.evergreen-ils.org Git - working/Evergreen.git/commit
Break up expensive queries, match index to quals
authorMike Rylander <mrylander@gmail.com>
Fri, 19 Jul 2013 16:35:31 +0000 (12:35 -0400)
committerDan Wells <dbw2@calvin.edu>
Fri, 9 Aug 2013 19:02:08 +0000 (15:02 -0400)
commit6990fd819c0dae385c3cc7a40d39a0ebed91086c
tree852b9c8c16d7f0781ce6badf6be2f56110690925
parentc0dea517395c733b77e8eb219d2c3f43f6098d42
Break up expensive queries, match index to quals

First, we order browse queries over MBE by (sort_value, value) so we
want to match the unique index to that.

We're only going to use the first few rows of the cursors we build from
the back/forward MBE paging queries, and the embedded GROUP BY defeats
the planners desire to use an index for ordering the rows. So, instead,
we use a simpler core query and gather aggregate data as a secondary,
index-capable query for each MBE row.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/src/sql/Pg/030.schema.metabib.sql
Open-ILS/src/sql/Pg/upgrade/YYYY.schema.bib-auth-browse.sql