3f51ca
From ff597260ef2f5e953b55ae1a8511191853becca8 Mon Sep 17 00:00:00 2001
3f51ca
From: Stanislav Laznicka <slaznick@redhat.com>
3f51ca
Date: Fri, 27 Oct 2017 09:34:38 +0200
3f51ca
Subject: [PATCH] Add indexing to improve host-find performance
3f51ca
3f51ca
host-find <host_name> command performance gets deteriorated when
3f51ca
there's way too many hosts in the LDAP tree. We're adding indices
3f51ca
to try and mitigate this behavior.
3f51ca
3f51ca
https://pagure.io/freeipa/issue/6371
3f51ca
3f51ca
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
3f51ca
---
3f51ca
 install/share/indices.ldif        | 45 +++++++++++++++++++++++++++++++++++++++
3f51ca
 install/updates/20-indices.update | 40 ++++++++++++++++++++++++++++++++++
3f51ca
 2 files changed, 85 insertions(+)
3f51ca
3f51ca
diff --git a/install/share/indices.ldif b/install/share/indices.ldif
3f51ca
index adb041d374d8fc48fff9d4b40208e7eda82857b3..7bd59d2774df9bdf56f6b8034236aa2c5658b366 100644
3f51ca
--- a/install/share/indices.ldif
3f51ca
+++ b/install/share/indices.ldif
3f51ca
@@ -279,3 +279,48 @@ objectClass: nsIndex
3f51ca
 nsSystemIndex: false
3f51ca
 nsIndexType: eq
3f51ca
 nsIndexType: sub
3f51ca
+
3f51ca
+dn: cn=description,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config
3f51ca
+changetype: add
3f51ca
+cn: description
3f51ca
+objectClass: top
3f51ca
+objectClass: nsindex
3f51ca
+nssystemindex: false
3f51ca
+nsindextype: eq
3f51ca
+nsindextype: sub
3f51ca
+
3f51ca
+dn: cn=l,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config
3f51ca
+changetype: add
3f51ca
+cn: l
3f51ca
+objectClass: top
3f51ca
+objectClass: nsindex
3f51ca
+nssystemindex: false
3f51ca
+nsindextype: eq
3f51ca
+nsindextype: sub
3f51ca
+
3f51ca
+dn: cn=nsOsVersion,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config
3f51ca
+changetype: add
3f51ca
+cn: nsOsVersion
3f51ca
+objectClass: top
3f51ca
+objectClass: nsindex
3f51ca
+nssystemindex: false
3f51ca
+nsindextype: eq
3f51ca
+nsindextype: sub
3f51ca
+
3f51ca
+dn: cn=nsHardwarePlatform,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config
3f51ca
+changetype: add
3f51ca
+cn: nsHardwarePlatform
3f51ca
+objectClass: top
3f51ca
+objectClass: nsindex
3f51ca
+nssystemindex: false
3f51ca
+nsindextype: eq
3f51ca
+nsindextype: sub
3f51ca
+
3f51ca
+dn: cn=nsHostLocation,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config
3f51ca
+changetype: add
3f51ca
+cn: nsHostLocation
3f51ca
+objectClass: top
3f51ca
+objectClass: nsindex
3f51ca
+nssystemindex: false
3f51ca
+nsindextype: eq
3f51ca
+nsindextype: sub
3f51ca
diff --git a/install/updates/20-indices.update b/install/updates/20-indices.update
3f51ca
index fb588b9ba8a2a89c9e7eab87ab5f224ca438645a..016fbb6bedb6af69fba0a8a84f8c1c6622d4368c 100644
3f51ca
--- a/install/updates/20-indices.update
3f51ca
+++ b/install/updates/20-indices.update
3f51ca
@@ -260,3 +260,43 @@ default: objectClass: nsIndex
3f51ca
 only: nsSystemIndex: false
3f51ca
 only: nsIndexType: eq
3f51ca
 only: nsIndexType: sub
3f51ca
+
3f51ca
+dn: cn=description,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config
3f51ca
+default: cn: description
3f51ca
+default: objectclass: top
3f51ca
+default: objectclass: nsindex
3f51ca
+default: nssystemindex: false
3f51ca
+default: nsindextype: eq
3f51ca
+default: nsindextype: sub
3f51ca
+
3f51ca
+dn: cn=l,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config
3f51ca
+default: cn: l
3f51ca
+default: objectclass: top
3f51ca
+default: objectclass: nsindex
3f51ca
+default: nssystemindex: false
3f51ca
+default: nsindextype: eq
3f51ca
+default: nsindextype: sub
3f51ca
+
3f51ca
+dn: cn=nsOsVersion,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config
3f51ca
+default: cn: nsOsVersion
3f51ca
+default: objectclass: top
3f51ca
+default: objectclass: nsindex
3f51ca
+default: nssystemindex: false
3f51ca
+default: nsindextype: eq
3f51ca
+default: nsindextype: sub
3f51ca
+
3f51ca
+dn: cn=nsHardwarePlatform,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config
3f51ca
+default: cn: nsHardwarePlatform
3f51ca
+default: objectclass: top
3f51ca
+default: objectclass: nsindex
3f51ca
+default: nssystemindex: false
3f51ca
+default: nsindextype: eq
3f51ca
+default: nsindextype: sub
3f51ca
+
3f51ca
+dn: cn=nsHostLocation,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config
3f51ca
+default: cn: nsHostLocation
3f51ca
+default: objectclass: top
3f51ca
+default: objectclass: nsindex
3f51ca
+default: nssystemindex: false
3f51ca
+default: nsindextype: eq
3f51ca
+default: nsindextype: sub
3f51ca
-- 
3f51ca
2.14.3
3f51ca