> hi,
> I have never managed to fully optimise a query, and i'd really appreciate a few pointers as I find rushmore somewhat elusive
>
> I have the following code:
>
>
SELECT Cm_tasks.*, Cm_vehicles.cmv_regno as regno, Cm_vehicles.cmv_pkey, Cm_vehicles.cmv_owned ;
> FROM cm_tasks ;
> LEFT OUTER JOIN cm_vehicles ;
> ON Cm_tasks.cmt_vehicle = Cm_vehicles.cmv_pkey ;
> WHERE Cm_tasks.cmt_propid == 2 ;
> AND Cm_tasks.cmt_due BETWEEN thisform.week1 and (thisform.week7 - 1) ;
> ORDER BY Cm_tasks.cmt_due ;
> INTO CURSOR curPlanner NOFILTER READWRITE
>
> thisform.week1 & 7 are date variables
>
> I have indexes on all referenced fields
>
> But when i test rushmore optimisation with SYS(3054) i get:
>
>
=SYS(3054,1,"cmemvar")
> ---------------------------
> Microsoft Visual FoxPro
> ---------------------------
>
> Using index tag Propid to rushmore optimize table cm_tasks
> Using index tag Due to rushmore optimize table cm_tasks
> Rushmore optimization level for table cm_tasks: partial
> Rushmore optimization level for table cm_vehicles: none
> ---------------------------
> OK
> ---------------------------
>
>
>
>
=SYS(3054,11,"cmemvar")
> ---------------------------
> Microsoft Visual FoxPro
> ---------------------------
>
> Using index tag Propid to rushmore optimize table cm_tasks
> Using index tag Due to rushmore optimize table cm_tasks
> Rushmore optimization level for table cm_tasks: partial
> Rushmore optimization level for table cm_vehicles: none
> Joining table cm_tasks and table cm_vehicles using index tag Pkey
> ---------------------------
> OK
> ---------------------------
>
> How can i improve this?
>
>
> Thanks
>
> John
do you have an index on DELETED()?
Mike Gagnon
Refox XI +(English version)