[open-ils-commits] r16028 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Mar 27 17:04:06 EDT 2010
Author: miker
Date: 2010-03-27 17:04:01 -0400 (Sat, 27 Mar 2010)
New Revision: 16028
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm
Log:
set an upper limit using the same value as the per-index-matchpoint search limit (effective upper limit) for safer sort-only browse
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm 2010-03-27 20:55:28 UTC (rev 16027)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm 2010-03-27 21:04:01 UTC (rev 16028)
@@ -521,6 +521,8 @@
$between = '';
}
+ my $core_limit = $self->QueryParser->core_limit || 25000;
+
my $sql = <<SQL;
SELECT $key AS id,
ARRAY_ACCUM(DISTINCT m.source) AS records,
@@ -545,6 +547,7 @@
AND $$flat_plan{where}
GROUP BY 1
ORDER BY 4 $desc, 5 DESC, 3 DESC
+ LIMIT $core_limit
SQL
warn $sql if $self->QueryParser->debug;
More information about the open-ils-commits
mailing list