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 18:56:13 +0000 (14:56 -0400)
commit910278f6e7412cb8a7d01811d06367bfca4cf8c5
treebbcc58ff08e8a3a010a9a3487987440de618849e
parenta8104c59697bdf36cf3ca7d917625b2160307393
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