Efficient use of text-containing field

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Dec 6 10:02:06 CST 2005


On 12/6/05 2:02 AM, "jda" <jda at his.com> wrote:

Hi Jon,
 
> I have lots of VarChar fields that will hold up to 1022 UTF-16 chars.
> Indexedbyword.
> 
> I have a sort method for each. All I need is for the sort to account
> for, say, the first 16 chars. Here is what I'm doing now:
> 
>    newfield = CreateVarCharField("newfield", 1022, EVFlag.fNullable +
> EVFlag.fIndexed + EVFlag.fIndexByWords)
>    newfield.storageEncoding = "UTF16"
>    newfieldSortMethod = CreateVarCharField("newfieldSortMethod", 16,
> EVFlag.fNullable, "left(newfield, 16)")
> 
> 
>   Is the sort method the most efficient (space-saving) way to do this?
> Or should I be doing something else? I do not need to be able to sort
> by the entire possible 1022 characters...

Yes this is the best way.

You really need index on newfield also?
You should understand you will have 2 different indexes for field then.

-- 
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