Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Mike Gagnon
  Where is Mike Gagnon?
 Pointe Claire
 Canada
 Mike Gagnon
 To: John McLellan
  Where is John McLellan?
 Birmingham
 United Kingdom
 John McLellan
 Tags
Subject: RE: How do i make queries Rush More?
Thread ID: 154045 Message ID: 154061 # Views: 89 # Ratings: 0
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Tuesday, December 11, 2007 5:18:14 PM         
   


> 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)



COMPLETE THREAD
How do i make queries Rush More? Posted by John McLellan @ 12/11/2007 3:50:16 PM
RE: How do i make queries Rush More? Posted by Mike Gagnon @ 12/11/2007 5:18:14 PM
RE: How do i make queries Rush More? Posted by tushar @ 12/11/2007 5:19:15 PM
RE: How do i make queries Rush More? Posted by Tamar Granor @ 12/11/2007 10:55:14 PM
RE: How do i make queries Rush More? Posted by John McLellan @ 12/13/2007 10:52:15 AM
RE: How do i make queries Rush More? Posted by Vincent Byrne @ 12/14/2007 2:38:13 PM
RE: How do i make queries Rush More? Posted by Olaf Doschke @ 12/12/2007 11:05:50 PM
RE: How do i make queries Rush More? Posted by Ken Murphy @ 12/13/2007 2:14:29 AM
RE: How do i make queries Rush More? Posted by John McLellan @ 12/13/2007 10:50:01 AM
RE: How do i make queries Rush More? Posted by Ken Murphy @ 12/13/2007 12:44:17 PM
RE: How do i make queries Rush More? Posted by Yull67 @ 12/18/2007 4:48:42 AM
RE: How do i make queries Rush More? Posted by Ken Murphy @ 12/18/2007 12:17:54 PM
RE: How do i make queries Rush More? Posted by Ken Murphy @ 1/4/2008 1:22:51 AM
RE: How do i make queries Rush More? Posted by Yull67 @ 1/4/2008 11:27:00 PM
RE: How do i make queries Rush More? Posted by Ken Murphy @ 1/5/2008 12:15:32 AM
RE: How do i make queries Rush More? Posted by John McLellan @ 12/13/2007 10:59:27 AM