diff --git a/config/alfresco/audit-services-context.xml b/config/alfresco/audit-services-context.xml
index 2b889fa114..57b937343f 100644
--- a/config/alfresco/audit-services-context.xml
+++ b/config/alfresco/audit-services-context.xml
@@ -24,6 +24,12 @@
+
+
+
+
+
+
diff --git a/config/alfresco/bootstrap-context.xml b/config/alfresco/bootstrap-context.xml
index c35d1cf720..5a1a605d7a 100644
--- a/config/alfresco/bootstrap-context.xml
+++ b/config/alfresco/bootstrap-context.xml
@@ -49,6 +49,7 @@
classpath:alfresco/dbscripts/create/2.2/${db.script.dialect}/AlfrescoPostCreate-2.2-MappedFKIndexes.sql
classpath:alfresco/dbscripts/create/2.2/${db.script.dialect}/AlfrescoPostCreate-2.2-Extra.sql
+ classpath:alfresco/dbscripts/create/2.2/${db.script.dialect}/post-create-indexes-04.sql
classpath:alfresco/dbscripts/create/3.0/${db.script.dialect}/create-activities-extras.sql
@@ -78,6 +79,7 @@
+
diff --git a/config/alfresco/dbscripts/create/2.2/org.hibernate.dialect.Dialect/post-create-indexes-04.sql b/config/alfresco/dbscripts/create/2.2/org.hibernate.dialect.Dialect/post-create-indexes-04.sql
new file mode 100644
index 0000000000..e7ce879199
--- /dev/null
+++ b/config/alfresco/dbscripts/create/2.2/org.hibernate.dialect.Dialect/post-create-indexes-04.sql
@@ -0,0 +1,12 @@
+--
+-- Title: Audit Path index
+-- Database: Generic
+-- Since: V2.1 Schema 81
+-- Author: Andy Hind
+--
+-- Please contact support@alfresco.com if you need assistance with the upgrade.
+--
+-- Audit path index
+
+
+CREATE INDEX idx_alf_adtf_pth ON alf_audit_fact (path);
diff --git a/config/alfresco/dbscripts/create/2.2/org.hibernate.dialect.MySQLInnoDBDialect/post-create-indexes-04.sql b/config/alfresco/dbscripts/create/2.2/org.hibernate.dialect.MySQLInnoDBDialect/post-create-indexes-04.sql
new file mode 100644
index 0000000000..2c63c5d7dd
--- /dev/null
+++ b/config/alfresco/dbscripts/create/2.2/org.hibernate.dialect.MySQLInnoDBDialect/post-create-indexes-04.sql
@@ -0,0 +1,12 @@
+--
+-- Title: Audit Path index
+-- Database: Generic
+-- Since: V2.1 Schema 81
+-- Author: Andy Hind
+--
+-- Please contact support@alfresco.com if you need assistance with the upgrade.
+--
+-- Audit path index
+
+
+CREATE INDEX idx_alf_adtf_pth ON alf_audit_fact (path(128));
diff --git a/config/alfresco/dbscripts/upgrade/2.2/org.hibernate.dialect.Dialect/AlfrescoSchemaUpdate-2.1-AuditPathIndex.sql b/config/alfresco/dbscripts/upgrade/2.2/org.hibernate.dialect.Dialect/AlfrescoSchemaUpdate-2.1-AuditPathIndex.sql
new file mode 100644
index 0000000000..ead27ee036
--- /dev/null
+++ b/config/alfresco/dbscripts/upgrade/2.2/org.hibernate.dialect.Dialect/AlfrescoSchemaUpdate-2.1-AuditPathIndex.sql
@@ -0,0 +1,23 @@
+--
+-- Title: Ensure the audit table path column is indexed
+-- Database: Generic
+-- Since: V2.1 Schema 82
+-- Author: Andy Hind
+--
+-- Please contact support@alfresco.com if you need assistance with the upgrade.
+--
+-- Path was previously unused and unindex - new we use it the index is required.
+
+CREATE INDEX idx_alf_adtf_pth ON alf_audit_fact (path);
+
+--
+-- Record script finish
+--
+DELETE FROM alf_applied_patch WHERE id = 'patch.db-V2.1-AuditPathIndex';
+INSERT INTO alf_applied_patch
+ (id, description, fixes_from_schema, fixes_to_schema, applied_to_schema, target_schema, applied_on_date, applied_to_server, was_executed, succeeded, report)
+ VALUES
+ (
+ 'patch.db-V2.1-AuditPathIndex', 'Manually executed script upgrade V2.1: Ensure existence of audit path index',
+ 0, 81, -1, 82, null, 'UNKOWN', 1, 1, 'Script completed'
+ );
\ No newline at end of file
diff --git a/config/alfresco/dbscripts/upgrade/2.2/org.hibernate.dialect.MySQLInnoDBDialect/AlfrescoSchemaUpdate-2.1-AuditPathIndex.sql b/config/alfresco/dbscripts/upgrade/2.2/org.hibernate.dialect.MySQLInnoDBDialect/AlfrescoSchemaUpdate-2.1-AuditPathIndex.sql
new file mode 100644
index 0000000000..1f3600ac25
--- /dev/null
+++ b/config/alfresco/dbscripts/upgrade/2.2/org.hibernate.dialect.MySQLInnoDBDialect/AlfrescoSchemaUpdate-2.1-AuditPathIndex.sql
@@ -0,0 +1,23 @@
+--
+-- Title: Ensure the audit table path column is indexed
+-- Database: Generic
+-- Since: V2.1 Schema 82
+-- Author: Andy Hind
+--
+-- Please contact support@alfresco.com if you need assistance with the upgrade.
+--
+-- Path was previously unused and unindex - new we use it the index is required.
+
+CREATE INDEX idx_alf_adtf_pth ON alf_audit_fact (path(128));
+
+--
+-- Record script finish
+--
+DELETE FROM alf_applied_patch WHERE id = 'patch.db-V2.1-AuditPathIndex';
+INSERT INTO alf_applied_patch
+ (id, description, fixes_from_schema, fixes_to_schema, applied_to_schema, target_schema, applied_on_date, applied_to_server, was_executed, succeeded, report)
+ VALUES
+ (
+ 'patch.db-V2.1-AuditPathIndex', 'Manually executed script upgrade V2.1: Ensure existence of audit path index',
+ 0, 81, -1, 82, null, 'UNKOWN', 1, 1, 'Script completed'
+ );
\ No newline at end of file
diff --git a/config/alfresco/patch/patch-services-context.xml b/config/alfresco/patch/patch-services-context.xml
index 71cbe0acfc..e0bac97291 100644
--- a/config/alfresco/patch/patch-services-context.xml
+++ b/config/alfresco/patch/patch-services-context.xml
@@ -1410,6 +1410,17 @@
+
+
+ patch.db-V2.1-AuditPathIndex
+ patch.schemaUpgradeScript.description
+ 0
+ 132
+ 133
+
+ classpath:alfresco/dbscripts/upgrade/2.2/${db.script.dialect}/AlfrescoSchemaUpdate-2.1-AuditPathIndex.sql
+
+