Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 339EE200B59 for ; Mon, 8 Aug 2016 14:46:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3235A160A91; Mon, 8 Aug 2016 12:46:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 79088160A8F for ; Mon, 8 Aug 2016 14:46:21 +0200 (CEST) Received: (qmail 75485 invoked by uid 500); 8 Aug 2016 12:46:20 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 75470 invoked by uid 99); 8 Aug 2016 12:46:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Aug 2016 12:46:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 704E12C0003 for ; Mon, 8 Aug 2016 12:46:20 +0000 (UTC) Date: Mon, 8 Aug 2016 12:46:20 +0000 (UTC) From: "John Peter (JIRA)" To: dev@directory.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (DIRSERVER-2162) Searcing for users using ObjectClass=person takes long MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 08 Aug 2016 12:46:22 -0000 [ https://issues.apache.org/jira/browse/DIRSERVER-2162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15411748#comment-15411748 ] John Peter edited comment on DIRSERVER-2162 at 8/8/16 12:45 PM: ---------------------------------------------------------------- Hi, thanks Emmannuel for getting back to me so quickly. I'm not sure where can I see the full amount of entries. Under the Search base: ou=users,dc=xxx,dc=fi we have # numEntries : 23506 The other parts combined have much fewer entries. Searching for (objectClass=person) shows # numEntries : 21586 We are using Apache 2.0.0-M20. I modified the C:\Program Files (x86)\ApacheDS\instances\default\conf\log4j.properties by adding: log4j.logger.org.apache.directory.server.xdbm.search.impl.DefaultSearchEngine=DEBUG Restarted apacheDS service. Re did the query (&(cn=*PETEJO*)(objectClass=person)) and the wrapper.log shows the below: INFO | jvm 1 | 2016/08/08 15:40:43 | [15:40:43] DEBUG [org.apache.directory.server.xdbm.search.impl.DefaultSearchEngine] - Nb results : 21586 for filter : (&:[21586](&:[21586](cn=*petejo*:[21627])(objectClass=person:[21586]))(#{SUBTREE_SCOPE (Estimated), 'ou=users,dc=hus,dc=fi', DEREF_ALWAYS}:[23506])) Re did the query (&(cn=*PETEJO*)(objectClass=*)) and the wrapper.log shows the below: INFO | jvm 1 | 2016/08/08 15:41:50 | [15:41:50] DEBUG [org.apache.directory.server.xdbm.search.impl.DefaultSearchEngine] - Nb results : 1 for filter : (&:[21627](cn=*petejo*:[21627])(#{SUBTREE_SCOPE (Estimated), 'ou=users,dc=hus,dc=fi', DEREF_ALWAYS}:[23506])) was (Author: jmrpet): Hi, thanks Emmannuel for getting back to me so quickly. I'm not sure where can I see the full amount of entries. Under the Search base: ou=users,dc=xxx,dc=fi we have # numEntries : 23506 The other parts combined have much fewer entries. We are using Apache 2.0.0-M20. I modified the C:\Program Files (x86)\ApacheDS\instances\default\conf\log4j.properties by adding: log4j.logger.org.apache.directory.server.xdbm.search.impl.DefaultSearchEngine=DEBUG Restarted apacheDS service. Re did the query (&(cn=*PETEJO*)(objectClass=person)) and the wrapper.log shows the below: INFO | jvm 1 | 2016/08/08 15:40:43 | [15:40:43] DEBUG [org.apache.directory.server.xdbm.search.impl.DefaultSearchEngine] - Nb results : 21586 for filter : (&:[21586](&:[21586](cn=*petejo*:[21627])(objectClass=person:[21586]))(#{SUBTREE_SCOPE (Estimated), 'ou=users,dc=hus,dc=fi', DEREF_ALWAYS}:[23506])) Re did the query (&(cn=*PETEJO*)(objectClass=*)) and the wrapper.log shows the below: INFO | jvm 1 | 2016/08/08 15:41:50 | [15:41:50] DEBUG [org.apache.directory.server.xdbm.search.impl.DefaultSearchEngine] - Nb results : 1 for filter : (&:[21627](cn=*petejo*:[21627])(#{SUBTREE_SCOPE (Estimated), 'ou=users,dc=hus,dc=fi', DEREF_ALWAYS}:[23506])) > Searcing for users using ObjectClass=person takes long > ------------------------------------------------------ > > Key: DIRSERVER-2162 > URL: https://issues.apache.org/jira/browse/DIRSERVER-2162 > Project: Directory ApacheDS > Issue Type: Bug > Affects Versions: 2.0.0-M20 > Reporter: John Peter > > When we do the below query the result takes long. Around 10-50 seconds. > Search base: ou=users,dc=xxx,dc=fi > Filter (&(cn=*USERNAME*)(objectClass=person)) > Scope: Subtree > However the below query returns the result immediately > Search base: ou=users,dc=xxx,dc=fi > Filter (&(cn=*USERNAME*)(objectClass=*)) > Scope: Subtree > Looking at the Partition settings it has Indexed attributes ObjectClass and cn. > First both queries took long. Then we added cn to the index and rebooted apacheDS and the second query got fast. > It seems like a bug that using ObjectClass in the query makes it slow all tough it is in the index. > It seems something similar was reported before DIRSERVER-2048, but it says it's fixed in M20 which we are using. -- This message was sent by Atlassian JIRA (v6.3.4#6332)