Index: trunk/ippToPsps/jython/scratchdb.py
===================================================================
--- trunk/ippToPsps/jython/scratchdb.py	(revision 35177)
+++ trunk/ippToPsps/jython/scratchdb.py	(revision 35191)
@@ -432,5 +432,6 @@
     def purgeTheseDvoRegions(self, regions, fileTypes):
 
-        detectionCount = self.getRowCount(self.dvoDetectionTable)
+        # XXX this must have been a remnant from something else: we are deleting a region, not entries from the dvoDetectionTable
+        # detectionCount = self.getRowCount(self.dvoDetectionTable)
         for region in regions:
           
@@ -448,12 +449,12 @@
                     pass
 
-        deletedDetectionCount = detectionCount - self.getRowCount(self.dvoDetectionTable)
+        # deletedDetectionCount = detectionCount - self.getRowCount(self.dvoDetectionTable)
 
         # after a big detection delete, we should OPTIMIZE the table
-        if deletedDetectionCount > 0:
-            self.logger.infoPair("Running OPTIMIZE on ", self.dvoDetectionTable)
-            self.optimizeTable(self.dvoDetectionTable)
-
-        return deletedDetectionCount
+        # if deletedDetectionCount > 0:
+        #     self.logger.infoPair("Running OPTIMIZE on ", self.dvoDetectionTable)
+        #     self.optimizeTable(self.dvoDetectionTable)
+
+        return 1
            
     '''
