Indexing is all about making rare data easy to find. If you have an attribute that occurs on 99% of your entries, indexing it won't save any search time, and it will needlessly slow down modify time.
Asking about "1,000,000" entries is meaningless on its own. It's not the raw number of entries that matters, it's the percentage of the total directory. If you have 1,000,000,000 entries in your directory, then 1,000,000 is actually quite a small percentage of the data and it might be smart to index it. If you have only 2,000,000 entries total, it may not make enough difference to be worthwhile.
It's not the raw numbers that matter, it's the frequency of occurrences.
How does the search work in conjunction with the base dn?
Does the search at first go to the index and lookup the attribute/value from the search filter, get all releated id's and then take the id's and get dn's from the entires via id2entry.bdb and then compare this with the basedn?
For example: I have an index objectclass and all my people in the dirctory have the objectClass=inetOrgPerson
In my company works about 140.000 people, divided in seven different departments (under each department are about 20.000 people). So my index for objectlcass=inetorgperson has about 140.000 entires, thats over BDB_IDL_LOGN 17 If I search over the whole DIT (from root), I catch the problem because 140.000>2^17
But if I limit the search with a more specific search base over only one department, does this matter to the speed in this case, or better get around the problem with BDB_IDL_LOGN 17? Can a more specific basedn speed up the search for filter with large results?
I ask this, because it seems to me, that the basedn does not matter in the search ...
Thanks and kindly regards Meike