我正在通过以下查询检索AD中的所有用户:
(&(objectClass=user)(objectCategory=person))
这需要很长时间(50k用户需要8分钟)。
我试图通过在objectGUID上添加条件(例如
)将其拆分为16个并行查询(&(objectGUID>=\00)(objectGUID<=\10))
(&(objectGUID>=\10)(objectGUID<=\20))
等等。这个标准适用于第一个GUID组的最低字节,正如我根据经验计算的那样。
但是,并行运行的所有查询都与单个查询一样快。这是我的日志:
(&(objectGUID>=\00)(objectGUID<=\10)): Starting fetch 03/13/2013 15:12:52
(&(objectGUID>=\30)(objectGUID<=\40)): Starting fetch 03/13/2013 15:12:52
(&(objectGUID>=\10)(objectGUID<=\20)): Starting fetch 03/13/2013 15:12:52
(&(objectGUID>=\20)(objectGUID<=\30)): Starting fetch 03/13/2013 15:12:52
(&(objectGUID>=\40)(objectGUID<=\50)): Starting fetch 03/13/2013 15:12:52
(&(objectGUID>=\50)(objectGUID<=\60)): Starting fetch 03/13/2013 15:12:52
(&(objectGUID>=\60)(objectGUID<=\70)): Starting fetch 03/13/2013 15:12:52
(&(objectGUID>=\70)(objectGUID<=\80)): Starting fetch 03/13/2013 15:12:52
(&(objectGUID>=\80)(objectGUID<=\90)): Starting fetch 03/13/2013 15:12:52
(&(objectGUID>=\90)(objectGUID<=\A0)): Starting fetch 03/13/2013 15:12:53
(&(objectGUID>=\A0)(objectGUID<=\B0)): Starting fetch 03/13/2013 15:12:54
(&(objectGUID>=\B0)(objectGUID<=\C0)): Starting fetch 03/13/2013 15:12:55
(&(objectGUID>=\C0)(objectGUID<=\D0)): Starting fetch 03/13/2013 15:12:56
(&(objectGUID>=\D0)(objectGUID<=\E0)): Starting fetch 03/13/2013 15:12:57
(&(objectGUID>=\E0)(objectGUID<=\F0)): Starting fetch 03/13/2013 15:12:58
(objectGUID>=\F0): Starting fetch 03/13/2013 15:12:59
(&(objectGUID>=\00)(objectGUID<=\10)): Ended fetch 03/13/2013 15:13:25, 3327 results
(&(objectGUID>=\20)(objectGUID<=\30)): Ended fetch 03/13/2013 15:14:00, 3225 results
(&(objectGUID>=\40)(objectGUID<=\50)): Ended fetch 03/13/2013 15:14:29, 3209 results
(&(objectGUID>=\50)(objectGUID<=\60)): Ended fetch 03/13/2013 15:14:58, 3133 results
(&(objectGUID>=\30)(objectGUID<=\40)): Ended fetch 03/13/2013 15:15:25, 3179 results
(&(objectGUID>=\70)(objectGUID<=\80)): Ended fetch 03/13/2013 15:15:56, 3291 results
(&(objectGUID>=\10)(objectGUID<=\20)): Ended fetch 03/13/2013 15:16:24, 3200 results
(&(objectGUID>=\60)(objectGUID<=\70)): Ended fetch 03/13/2013 15:16:57, 3222 results
(&(objectGUID>=\80)(objectGUID<=\90)): Ended fetch 03/13/2013 15:17:26, 3227 results
(&(objectGUID>=\90)(objectGUID<=\A0)): Ended fetch 03/13/2013 15:17:54, 3084 results
(&(objectGUID>=\A0)(objectGUID<=\B0)): Ended fetch 03/13/2013 15:18:30, 3195 results
(&(objectGUID>=\B0)(objectGUID<=\C0)): Ended fetch 03/13/2013 15:19:06, 3208 results
(&(objectGUID>=\C0)(objectGUID<=\D0)): Ended fetch 03/13/2013 15:19:35, 3084 results
(&(objectGUID>=\D0)(objectGUID<=\E0)): Ended fetch 03/13/2013 15:20:04, 3181 results
(&(objectGUID>=\E0)(objectGUID<=\F0)): Ended fetch 03/13/2013 15:20:36, 3149 results
(objectGUID>=\F0): Ended fetch 03/13/2013 15:21:05, 3200 results
看起来每个下一个查询都会在执行时间上添加30秒。
objectGUID
索引?