TIP: Feature request: Collation settings on connection level
Ruslan Zasukhin
sunshine at public.kherson.ua
Tue Jun 19 05:07:42 CDT 2007
On 19/6/07 1:01 PM, "Ruslan Zasukhin" <sunshine at public.kherson.ua> wrote:
>> now for this last example I think your suggestion works
>> TIP:
>> you can make virtual field (Table Method) and specify
>> for it other location, then its index will be DIFFERENT.
>> Payment for this -- overhead to maintain this index.
>>
>> I don't really see how I can specify for a field a collation but will
>> look into it
>>
>>
>> I understand your problem, but I am sure I worked with databases
>> (don't remember which one) that permitted me to define indexes for a
>> given collation and let me specify what index to use when doing a sort.
>
> No problems here for Valentina also.
>
> You make Table Method,
>
> fld2 = tbl.CreateVarCharField( "fld2", 2044, fIndexed, "fld1" )
>
> "fld1" - is FORMULA, i.e. Value of fld2 virtual field will be
> the same as fld1.
>
> And now you say:
>
> fld2.CollationAttribute( ... )
>
> This 2 steps effectively just create on disk ONE MORE index,
> Which now will work by this new collation.
>
> And now you CAN CHOOSE what index to use in what query.
> In fact you do this via name of field
>
> ORDER BY fld1 -- German
> ORDER BY fld2 -- French
Another TIP:
It is better even improve formula, in case if you really need German index
only for GERMAN records. May be something as:
fld2 = tbl.CreateVarCharField( "fld2", 2044, fIndexed,
"if( fld_lang='de', fld1, NULL )"
I.e. Formula selects only German records, all rest are NULL, and they eat
ZERO disk space and TIME in the index.
--
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