Optimize container filters in QueryParser
authorMike Rylander <mrylander@gmail.com>
Thu, 12 Sep 2013 17:13:23 +0000 (13:13 -0400)
committerDan Scott <dscott@laurentian.ca>
Thu, 12 Sep 2013 17:45:43 +0000 (13:45 -0400)
commitd1d41d16c7ace2c097c0dbea8c0b72a3bc6a690c
tree8c01d2df6a47bdf89311adb9bd9abf74ace9a45a
parent2e447f31f3cd379b8323d646be7e10333153f498
Optimize container filters in QueryParser

When a container filter is used at the top level of a QueryParser
query (that is, in a simple query with no OR-logic branches or explicit
nesting groups) we can use an INNER join instead of LEFT + IS NOT NULL.

On some production datasets this showed an increase in performance from
20+ seconds to 1ms for the core query.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm