Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: chris smith
  Where is chris smith?
 Yorkshire CH CH
 Barbados
 chris smith
 To: Mike Gagnon
  Where is Mike Gagnon?
 Pointe Claire
 Canada
 Mike Gagnon
 Tags
Subject: RE: how to speed up a query
Thread ID: 155380 Message ID: 155386 # Views: 1 # Ratings: 0
Version: Visual FoxPro 6 Category: General VFP Topics
Date: Monday, December 31, 2007 2:21:26 PM         
   


> > Hello all
> >
> > I have the folowing select statment in the init event of a form and it takes "forever" to display the data, (about 150000 record in the table). Only one table is involved in the query and it has a primary index on salesno field. I tried sys(3054,11) and it says that rushmore optimization is none. How can I speed up this query.
> >
> >
> >
thisform.grid1.recordsource = "SELECT Sale.salesno, Sale.saledate,Sale.custid, Sale.empid, Sale.total FROM salesclerk!sale where Sale.sus <> .T. and Sale.saledate == thisform.date ORDER BY Sale.salesno DESC into cursor viewreprint"

> >
> > cheers
> > smith
>
> Do you have an index on both Sale.sus and Sale.saledate and on DELETED()?
>
> Mike Gagnon
> Refox XI +(English version)


No! I just read it in the programmer guide that I should have them indexes, thanks. It shows that the optimization is fully utilized here on my test data, I will try it on the live data and report what happens.

Thanks very much for your response

smith

ENTIRE THREAD

how to speed up a query Posted by chris smith @ 12/31/2007 1:47:42 PM
RE: how to speed up a query Posted by Mike Gagnon @ 12/31/2007 2:04:44 PM
RE: how to speed up a query Posted by chris smith @ 12/31/2007 2:21:26 PM
RE: how to speed up a query Posted by Cetin Basoz @ 12/31/2007 3:33:33 PM
RE: how to speed up a query Posted by Ken Murphy @ 1/4/2008 1:20:40 AM