Efficient use of text-containing field

Ed Kleban Ed at Kleban.com
Mon Dec 5 20:46:24 CST 2005




On 12/5/05 8:32 PM, "jda" <jda at his.com> wrote:

>> One option if you're really concerned about performance because:
>> 
>>     1) you have a LOT of records, and
>>     2) a lot of the strings in VarChar(1022) field really are sizeable in
>>        length, i.e significantly longer than 16 characters,
>> 
>> 
>>> 
>>>   Is the sort method the most efficient (space-saving) way to do this?
> 
> As I said, I do not care about performance. It is already blazingly
> fast. I care about size/space.
> 

Yes, but you did not explain why you needed the items sorted, which would
determine whether the hash approach I suggest would be viable for your
needs.  If so, it's unlikely you'll find a more space-efficient way of doing
it.  

If not, then the String(16) approach is probably your best bet, because as I
noted you can't index a field declared as IndexByWords.  If speed is a total
non issue and you only needed do the sort once after filling the table and
then using it read-only you could certainly use the String(16) approach to
sort, then fill in a SortOrder field based upon the result, and then throw
the String(16) field away... Or build the String(16) array in a parallel
temporary table that you subsequently punt.

Hope that helps.







More information about the Valentina mailing list