Index: /tags/ipp-20130712/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm
===================================================================
--- /tags/ipp-20130712/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm	(revision 36645)
+++ /tags/ipp-20130712/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm	(revision 36646)
@@ -468,4 +468,12 @@
             $skycell_id = $component;
             $choose_components = 1;
+            if ($req_type eq 'byskycell' and $skycenter) {
+                # Add a wide coordinate cut to the releasetool command.
+                # This greatly speeds up the query by reducing the number of exposures considered
+                # to those near the region of interest.
+                # The actual radius value that we use is not critical because the skycell cut does the relevant
+                # selection.
+                $command .= " -ra $row->{CENTER_X} -decl $row->{CENTER_Y} -radius 5.0";
+            }
         } else {
             $command = "$warptool -pstamp_order -dbname $imagedb";
@@ -1094,5 +1102,5 @@
             setErrorCodes($rowList, $PSTAMP_NO_IMAGE_MATCH);
         } else {
-            # XXX: We are not applying the fwhm cuts
+            # XXX: We are not applying the fwhm cuts unless we use releasetool
             foreach my $skycell (@$skycells) {
                 my $these_results = lookup($ipprc, $rowList, $imagedb, "byskycell", $stage, undef,
