by accademia@[EMAIL PROTECTED]
Jun 25, 2007 at 11:06 AM
Rush Strong ha scritto:
>
>
> accademia@[EMAIL PROTECTED]
wrote:
> On 25 Giu, 18:47, accade...@[EMAIL PROTECTED]
wrote:
>
>
> I am using a DBF that has the following structure:
>
> field1 Numeric 5 0
> field2 Char 5
>
> The DBF has an index CDX. The key expression is str(field1,6)+field2
> I use function relate4queryset("str(field1,5) <> ' 0'").
> Why function relate4optimizeable return 0 (Not optimizeable) ?
>
> Thank you for the help
>
> Regards
> Catello
> Italia
>
>
>
> Sorry for the mismatch.
> The key expression is str(field1,5) + field2
> Regards
>
>
> Try:
>
> relate4queryset("str(field1,5) + field2 <> ' 0'")
>
> The entire key expression needs to be referenced in order for
optimization to kick in.
>
> - Rush
Thank you Rush for the quick response.
You are right ! If I use the tag's exact key expression Query
Optimization works.
But in the Codebase User's manual (page 90) I read :
"Specify a query expression that contains in whole or in part, a top
master tag key compared to a constant" so I suppose that I may use a
partial tag's key expression (the n first left characters).
Why instead this doesn't works ?
Regards
Catello