Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Tore Bleken
  Where is Tore Bleken?
 Tore Bleken
 To: Khurram Tahir
  Where is Khurram Tahir?
 Khurram Tahir
Subject: RE: Seek Vs Select Sql in Speed
Thread ID: 395754 Message ID: 395766 # Views: 45 # Ratings: 0
Version: Visual FoxPro 9 Category: Projects and Design
Date: Saturday, January 18, 2014 5:48:53 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 

Create three index tags, on fld1, fld2 and fld3, and you will get "top speed" since Rushmore will use them.

My recommendation is to always use SQL Select. The reason for this is that you may sooner or later have to work with data from SQL server instead of DBFs, and then the conversion is very easy. If there is a speed difference I don't know, but if there is one, it will be minimal.

There's a fine line between helping and adding to the confusion.

How to create sample data


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