Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Anders Altberg
  Where is Anders Altberg?
 Anders Altberg
 To: Khurram Tahir
  Where is Khurram Tahir?
 Khurram Tahir
Subject: RE: Seek Vs Select Sql in Speed
Thread ID: 395754 Message ID: 395758 # Views: 49 # Ratings: 0
Version: Visual FoxPro 9 Category: Projects and Design
Date: Saturday, January 18, 2014 3:05:54 PM         

> Table1 has more then 70000 Records and accessing on multiuser environment and on Lan Select command performing Slow Speed
SELECT * FROM Table1 WHERE Fld1 = lcA AND Fld2 = lcB AND Fld3 <> lnC INTO CURSOR TcCnt

> 1st) Now Created join index on above fields also
INDEX ON Fld1+Fld2+STR(Fld3,6)	TAG FLD_123

> How can use Seek or IndexSeek as Seek is faster then Select Sql-Command
SEEK Fld1+Fld2+Fld3 && But here Fld3 is with <> How i use this in combine Seek 

In an optimizable WHERE or FOR clause you have you use excactly the same expression as the index expression
.. WHERE fl1+fld2+STR(fld3,3) = m.lcA+m.lcB+STR(m.lnC,3)
would work but <> is not optimizable. Just leave it out of the index. Index fld3 separately
WHERE fld1+föd2=m.lcA+m.lcB AND fld3>0



Seek Vs Select Sql in Speed Posted by Khurram Tahir @ 1/18/2014 2:13:38 PM
RE: Seek Vs Select Sql in Speed Posted by Vivek Deodhar @ 1/18/2014 2:45:54 PM
RE: Seek Vs Select Sql in Speed Posted by Anders Altberg @ 1/18/2014 3:05:54 PM
RE: Seek Vs Select Sql in Speed Posted by Tore Bleken @ 1/18/2014 5:48:53 PM