Handling duplicate records

Ruslan Zasukhin ruslan_zasukhin at valentina-db.com
Fri Jan 4 08:51:53 CST 2013


On 1/4/13 4:38 PM, "Beatrix Willius" <bwillius at gmx.de> wrote:

> HmmŠ.
> 
> When I use an ArraySet instead with
> 
> dim theCheckset as VArraySet =
> theArchive.Table("Message").Field("InternalMessageID").FindValueAsArraySet(Lef
> t(InternalMessageID, 100), nil, 1)
> 
> The code runs a bit slower.

Strange.

Is your table BIG? I mean has a lots of records?


Again I do not see. This pice of code takes many time,
Because it is called a lots of times in some loop?

IF YES, then also good idea avoid
    theArchive. Table("Message").Field("InternalMessageID")

And do this ONCE and save
          Vfield  fldMsgID





> But I don't understand how the last parameter
> inSearchPref as EvSearch = kPreferIndexed ) as VArraySet
> 
> can be made to work without index.

Yes, can be force not indexed search.
There is sense, when you pass into this function some inSelection of
records.

It is clear, that if inSelection has e.g. 10 records,
But table million records, it can be faster just check WITHOUT index values
then touch index on million records.


 
> On 04.01.2013, at 15:17, Beatrix Willius <bwillius at gmx.de> wrote:
> 
>> dim theCheckset as VBitSet =
>> theArchive.Table("Message").Field("InternalMessageID").FindValue(Left(Interna
>> lMessageID, 100))
>> if theCheckset = nil then
>>   Return true
>> else
>>   dim i as Integer = theCheckset.Count
>>   if i = 0 then
>>     Return true
>>   else
>>     Return False
>>   end if
>> end if

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list