summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@redhat.com>2008-12-06 00:03:59 +0000
committerNoriko Hosoi <nhosoi@redhat.com>2008-12-06 00:03:59 +0000
commit055e79bf0dfaddcb9e6580d12e6fc03bc443ee3f (patch)
tree76faa811b0508a4128b3ad5eb91b2f1b2db33ccc
parentc8bfd0cd85c3ec59e3fe90c2cf122f984db8288f (diff)
downloadds-055e79bf0dfaddcb9e6580d12e6fc03bc443ee3f.tar.gz
ds-055e79bf0dfaddcb9e6580d12e6fc03bc443ee3f.tar.xz
ds-055e79bf0dfaddcb9e6580d12e6fc03bc443ee3f.zip
Resolves: #447353
Summary: RFE: search optimization and single character substring searches (comment #20) Description: update the comments to adjust to the program.
-rw-r--r--ldap/servers/slapd/back-ldbm/back-ldbm.h36
1 files changed, 24 insertions, 12 deletions
diff --git a/ldap/servers/slapd/back-ldbm/back-ldbm.h b/ldap/servers/slapd/back-ldbm/back-ldbm.h
index 078aea6b..1b6dda54 100644
--- a/ldap/servers/slapd/back-ldbm/back-ldbm.h
+++ b/ldap/servers/slapd/back-ldbm/back-ldbm.h
@@ -362,24 +362,36 @@ typedef struct idl_private idl_private;
typedef struct attrcrypt_private attrcrypt_private;
/*
- * Special attribute for an index entry
- * Usage: turn an index object to extensibleobject and
- * set an integer value for each
- * dn: cn=sn, cn=index, cn=userRoot, cn=ldbm database, cn=plugins, cn=config
- * objectClass: extensibleObject
- * nsSubStrBegin: 2
- * nsSubStrMiddle: 3
- * nsSubStrEnd: 2
- * [...]
+ * Special attributes for an index entry to change the substring index width.
+ * By default, substring index width is 3, i.e., search with the filter
+ * "(cn=abc*)" is an indexed search, but "(cn=ab*)" or "(cn=a*)" isn't.
+ * There is a big performance gap between the indexed search and the unindexed
+ * search especially when the database is large. To convert such unindexed
+ * search to the indexed search to speed up the query, these nsSubStr
+ * attributes are introduced.
+ *
+ * How to use the nsSubStr attributes:
+ * 1) turn the target index to extensibleobject by adding
+ * "objectClass: extensibleObject" to the index entry
+ * 2) set the length to each nsSubStr attribute of the index
+ * dn: cn=sn, cn=index, cn=userRoot, cn=ldbm database, cn=plugins, cn=config
+ * objectClass: extensibleObject
+ * nsSubStrBegin: 2
+ * nsSubStrMiddle: 3
+ * nsSubStrEnd: 2
+ * [...]
*
- * By default, the minimum key length triplets of substring index is 2, 3, 2.
- * The length is changed by setting this nsSubStrLen value.
+ * By default, the minimum key length triplets of substring index is 3, 3, 3.
+ * The length is changed by setting the triplets nsSubStrBegin, nsSubStrMiddle,
+ * nsSubStrEnd, respectively.
*
* Note: If any of the key length value is modified, the index file needs
* to be regenerated. Otherwise, the index file is going to have mixed
* key length.
* To change the key length,
- * 1) stop the server, 2) run db2index -t <attr>, 3) start the server.
+ * 1) stop the server,
+ * 2) run db2index -t <attr>,
+ * 3) start the server.
*/
#define INDEX_ATTR_SUBSTRBEGIN "nsSubStrBegin"
#define INDEX_ATTR_SUBSTRMIDDLE "nsSubStrMiddle"