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

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