SQL and API methods + benchs
Ruslan Zasukhin
sunshine at public.kherson.ua
Mon Jan 24 10:35:24 CST 2005
On 1/24/05 10:19 AM, "Olivier" <vidal_olivier at yahoo.fr> wrote:
>>> Dim setBit have vbitset
>>> Dim setArray have varrayset
>>> Dim set have vset
>>>
>>> setBit=base.zipCity.stringField("zipcode").find("75000") //OK
>>
>> You use FindValue() so it returns BitSet.
>>
>> Oliver, if you want to get ArraySet then you should use simple
>> FindValueAsArraySet()
>
> yes, but it NOT exist FindStartWithAsArraySet or FindLikeAsArraySet or
> FindRegexAsArraySet...
Right!
Again,
ArraySet is preferred only of you KNOW that you will find few records from
40,000 table records.
BitSet is preferred in all rest cases.
----------
FindValue() searches for ONE value.
Exists many chances that will be not many records that have one the same
value. So in this case ArraySet can be good.
----------
Next, in the SQL mashine, we use only bitSets, btw.
----------
If you going do Intersection for results, then you MUST use the same types
BitSet + BitSet
So in this case use bitSets always.
-------------
FindLike() returns BitSet, because MOST PROBABLY it will find many records
that match pattern.
----------
So Oliver, AS ARRAY SET functions, will be used very rare I think.
Only for specific tasks, when I know that I will find dew records,
When I will not intersect with BitSets.
I.e. I just want find that 5 records, and iterate them in loop.
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina-beta
mailing list