Optimize container filters in QueryParser user/miker/optimize-container-join
authorMike Rylander <mrylander@gmail.com>
Thu, 12 Sep 2013 17:13:23 +0000 (13:13 -0400)
committerMike Rylander <mrylander@gmail.com>
Thu, 12 Sep 2013 17:20:46 +0000 (13:20 -0400)
commit26e983ba1195e8f1994cd30a2949945df6139228
tree67f32e3d523be85057f6521a691b4811f4b85297
parentdc7ec6cfb60d66150ad43d4157a63ea739667217
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>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm