大网数据广告活动
域与目录服务

Indexed Attributes (AD DS)

· 52CE 我爱测

Attributes may be indexed. Indexing an attribute can improve the performance of queries for that attribute.

Attributes may be indexed. Indexing an attribute can improve the performance of queries for that attribute.

An attributes is indexed when the searchFlags attribute in the attribute's schema definition has the least significant bit set to 1. Setting the least significant bit of the searchFlags attribute schema definition to 1 will dynamically build an index. Setting the least significant bit of the searchFlags attribute schema definition to 0 will cause the index for the attribute to be removed. The index will be built automatically by a background thread on the domain controller.

Ideally, indexed attributes should be single valued with highly unique values evenly distributed across the set of instances. The less unique the values of an attribute are, the less effective the index will be.

Multi-valued attributes can also be indexed, but the cost to build the index for a multi-valued attribute is larger in terms of storage, update, and search time. The uniqueness requirement for a multi-valued property is the same as that for a single-valued property—the more unique the values are the more effective the index.

The more indexed attributes a class has, the more time is required to create new instances of the class.

Indexes apply to attributes, not to classes. That is, when an attribute is marked as indexed, all instances of the attribute are added to the index, not just the instances that are members of a particular class.

To verify that a server is using an index to process a query, set the following registry value on a domain controller to 4. Then perform a query on that domain controller and look in the directory event log for data about the indexes, if any, used to process the query.

HKEY_LOCAL_MACHINE
   SYSTEM
      Current Control Set
         Services
            NTDS
               Diagnostics
                  9 Internal Processing

For more information about other bits in the searchFlags property, see Characteristics of Attributes.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。