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:46:06 +0000 (13:46 -0400)
commit199f25958dcccb992e3b62ed9fc605c792396414
treeedb7f627cc830c9a8a0db72ac16b2a582ad29134
parente330dd4c20b1b8ccb7375b4a326069521a0879b4
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