FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Directory

 
 
LinkBack Thread Tools
 
Old 03-24-2010, 07:58 AM
"jim@scusting.com"
 
Default Optimising queries

Hi, I have some queries which are showing in the logs as not being
indexed (notes=U right?). In the example below the accountid is indexed
but the authrole is not, but I would of expected the query to use the
accountid index?

conn=308 op=1 SRCH base="o=blah.com" scope=2
filter="(&(accountid=abc123)(authrole=PowerUser))" attrs=ALL
conn=308 op=1 RESULT err=0 tag=101 nentries=1 etime=0 notes=U

Do I need to index the authrole attribute as well in order for the
indexes to be used on a query like this? If I need to add indexes for
anything that maybe in included in an & LDAP query, and indexes for
anything that may require sorting on (my previous post) then I'll end up
with indexes for just about everything!

Can anyone recommend any good sites & tools for explaining LDAP queries
and indexing? I did some searching but not found anything usefull which
explains why the above would not be indexed. I have previously used
MySQL and I'm sure the above equivalent which just use the accountid
index and not worry about the authrole not being indexed.

Thanks.

Jim.
--
389 users mailing list
389-users@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/389-users
 
Old 03-24-2010, 12:56 PM
Richard Megginson
 
Default Optimising queries

----- jim@scusting.com wrote:

> Hi, I have some queries which are showing in the logs as not being
> indexed (notes=U right?).

Right. You can also get notes=U if you are hitting the idlscanlist limit (which you are probably not doing).

> In the example below the accountid is
> indexed
> but the authrole is not, but I would of expected the query to use the
>
> accountid index?

The "&" operator in this case does not work like a short circuit AND operator in most programming languages. 389 ds may consult both indexes in an attempt to optimize the query.

>
> conn=308 op=1 SRCH base="o=blah.com" scope=2
> filter="(&(accountid=abc123)(authrole=PowerUser))" attrs=ALL
> conn=308 op=1 RESULT err=0 tag=101 nentries=1 etime=0 notes=U
>
> Do I need to index the authrole attribute as well in order for the
> indexes to be used on a query like this?

Yes.

> If I need to add indexes for
>
> anything that maybe in included in an & LDAP query, and indexes for
> anything that may require sorting on (my previous post) then I'll end
> up
> with indexes for just about everything!

Perhaps.

>
> Can anyone recommend any good sites & tools for explaining LDAP
> queries
> and indexing? I did some searching but not found anything usefull
> which
> explains why the above would not be indexed. I have previously used
> MySQL and I'm sure the above equivalent which just use the accountid
> index and not worry about the authrole not being indexed.

In the LDAP world this is highly server dependent, so there is not really a sort of generic LDAP server index methodology, as there might be in the SQL world.

I suggest starting here - http://www.redhat.com/docs/manuals/dir-server/8.1/admin/Managing_Indexes.html and here - http://www.redhat.com/docs/manuals/dir-server/8.1/admin/Tuning_DS_Performance.html
>
> Thanks.
>
> Jim.
> --
> 389 users mailing list
> 389-users@lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/389-users
--
389 users mailing list
389-users@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/389-users
 

Thread Tools




All times are GMT. The time now is 02:15 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org