Efficient use of text-containing field

jda jda at his.com
Mon Dec 5 19:02:52 CST 2005


Hi Ruslan,

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

Thanks,

Jon


More information about the Valentina mailing list