kPreferIndexed

Ed Kleban Ed at Kleban.com
Mon Nov 21 12:16:39 CST 2005




On 11/21/05 12:06 PM, "Ruslan Zasukhin" <sunshine at public.kherson.ua> wrote:

> On 11/21/05 4:36 PM, "Ed Kleban" <Ed at Kleban.com> wrote:
> 
>> My understanding from reading the V4RB reference manual, is that if you
>> disable Indexing for a field, and then later perform a search such as
>> FindSingle on that field with kPreferIndexed, then at that time V4RB will
>> first create an index for that field as if you had enabled isIndexed=true,
>> and that the index will then be retained and updated as additional records
>> are added until you subsequently changed to isIndexed=false.
>> 
>> So then, if I remove an index then it will be recreated automatically the
>> next time I do a search that needs it.
>> 
>> Is all of this correct?
> 
> No. 
> 
> At least for now logic of engine is:
> 
> 
>     if( mpFldStorage->get_IndexFile() && inSearchPref == kPreferIndexed )
>     {
>         // we do indexed search
>     }
>     else // we scan the whole table.
>     {    
>     }
> 
> 
> So you can use this option to AVOID search by index.
> This can be useful, if you already have small set of records to iterate.
> You could get this set from searches by prev fields.

Ah, I see.  So you can avoid the search by index, but the table won't get
indexed until or unless you explicitly set fIndexed = true.  Ok, got it.




More information about the Valentina mailing list