manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1476260 - /manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PrereqEventManager.java
Date Fri, 26 Apr 2013 15:57:47 GMT
Author: kwright
Date: Fri Apr 26 15:57:47 2013
New Revision: 1476260

URL: http://svn.apache.org/r1476260
Log:
Add an index to help out the join between the prereqevents table and the event table, as recommended
by Postgresql people.

Modified:
    manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PrereqEventManager.java

Modified: manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PrereqEventManager.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PrereqEventManager.java?rev=1476260&r1=1476259&r2=1476260&view=diff
==============================================================================
--- manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PrereqEventManager.java
(original)
+++ manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PrereqEventManager.java
Fri Apr 26 15:57:47 2013
@@ -78,6 +78,7 @@ public class PrereqEventManager extends 
 
       // Index management
       IndexDescription ownerIndex = new IndexDescription(false,new String[]{ownerField});
+      IndexDescription eventNameIndex = new IndexDescription(false,new String[]{eventNameField});
 
       // Get rid of indexes that shouldn't be there
       Map indexes = getTableIndexes(null,null);
@@ -89,6 +90,8 @@ public class PrereqEventManager extends 
 
         if (ownerIndex != null && id.equals(ownerIndex))
           ownerIndex = null;
+        else if (eventNameIndex != null && id.equals(eventNameIndex))
+          eventNameIndex = null;
         else if (indexName.indexOf("_pkey") == -1)
           // This index shouldn't be here; drop it
           performRemoveIndex(indexName);
@@ -97,6 +100,8 @@ public class PrereqEventManager extends 
       // Add the ones we didn't find
       if (ownerIndex != null)
         performAddIndex(null,ownerIndex);
+      if (eventNameIndex != null)
+        performAddIndex(null,eventNameIndex);
 
       break;
     }



Mime
View raw message