>>Yes - very much faster. Yours works and I will use it. Thanks. Just wonder why mine doesn't now when it used to in 8.
>>
>>
>Hi Robert,
>
>I think it's VFP9 bug. Here's repro code
SET TALK OFF
>RAND(-1)
>lnMaxKeys = 100
>lnMaxRec = 1000
>CREATE CURSOR lossitem ( ;
> Lit_LosFK i, Lit_Date D)
>FOR i=1 TO lnMaxRec
> lnKey = irand(1, lnMaxKeys)
> ldDate = DATE() - irand(1, 500)
> INSERT INTO lossitem VALUES (lnKey, ldDate)
>ENDFOR
>
>CLEAR
>SYS(3054,11)
>select Lit_LosFK, Lit_Date ;
> from LOSSITEM ;
> where str(Lit_LosFK, 6) + dtos(Lit_Date) in ;
> (select str(Lit_LosFK, 6) + min(dtos(Lit_Date)) from LOSSITEM group by Lit_LosFK) ;
> group by 1, 2 ;
> into cursor curFIRSTLOSSPAYMENT1 nofilter
>
>
>
Observed >
>Query time under VFP8 is 0.010 seconds and Rushmore Query Optimization Level
>
>Rushmore optimization level for intermediate result: none
>Rushmore optimization level for intermediate result: none
>Rushmore optimization level for intermediate result: none
>Joining intermediate result and intermediate result using temp index
>
>Query time under VFP9 is 0.200 seconds and Rushmore Query Optimization Level
>
>Rushmore optimization level for intermediate result: none
>Rushmore optimization level for intermediate result: none
>Rushmore optimization level for intermediate result: none
>Joining intermediate result and intermediate result
(Cartesian product) < == BUG
>
>
Expected>
>The same query optimizationd and time under VFP9 as under VFP8
Hi Sergey,
with SET ANSI ON ? ( i have not VFP9 )
Fabio