Efficient use of text-containing field

jda jda at his.com
Tue Dec 6 07:58:22 CST 2005


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

Hi Ruslan,


Hm, newfield is indexedByWordss so I can search for words in each 
field (as opposed to just search from beginning of the field).

As for the sortmethod, this is unavoidable in Valentina if I need to 
sort by this field. I have suggested in the past that Valentina 
default to sort by entire field if the field is indexedbywords. That 
would mean I could get rid of about 30 sort methods!

Jon


More information about the Valentina mailing list