Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does A Simple SEEK causes full table fetch to workkstation ?

Status
Not open for further replies.

VFP7

Programmer
Jan 17, 2001
15
IN
Hi friends.

After going thru various related threads and articles I knew that in VFP if I run a SQL query, the whole tables is fetched first to the workstation and then result-set is created. Suppose I find a way to execute SQL (as decribed in A FoxPro Server article in Universal Threads - VFP Articles) on server itself. Now I wonder, if I use a table and simply seek a record - Do still it will fetch whole table and then give me the piece of data I required. If yes, what is the solution. My application is still in developement phase and I can turn to any good technique. Please help me.

Thanks
 
Hello.

To be more specific: Seek needs an index. If your table is somewhere in the network, SEEK needs to know where to move the record. For this reason, it will fetcg the index (that's it: the .CDX file). Anyway, this is the fastest method you have.

Hope this helps. Grigore Dolghin
Class Software
Bucharest, Romania
 
If I read your question right, you're wondering how much actual data is downloaded to perform the SEEK function. I can say that very little is actually transferred. I have a table that is several hundred megabytes in size with an even bigger index file, yet executing a SEEK command is instantaneous.
 
Hi VFP7,

Just a suggestion.. Many of your questions relate to performance. Personaly, I feel the physical quantum of time involved is more important.. while the perform can be argued as this is better or that is better. In todays hardware.. big arguments are out between AMDs CPU handling the situation and Intel CPU doing the same in another way... the CPU cache, then SCSI harddisk or the IDE harddisk.. then two motherboards are not alike.. the two networks and the transportation protocols could be dealing matters in different ways..

Well well... we all want our coding do the best to perform... The approach is laudable.. But to evaluate a situation, you can just create a DBF or database with dummy data of whatever number of records you need. (I have done such experiments). With just a loop you can keep creating a lot of records, inserting values of the count... example

USE myTable
LOCATE
IF BOF()
APPEND BLANK
ENDIF
SCATTER MEMVAR BLANK
FOR I = 1 to 1000000
m.myField1 = STR(I)
INSERT INTO myTable FROM MEMVAR
ENDFOR

This is just an example.. And now your table is ready. If you want a random table, you can use a RAND generator and use m.myField1 = myRAND in the loop.(Remember to STRING it.

Then do the experiments.. you will get the FIRST HAND FEEL OF the real speed situation.

As Chpicker pointer out, the speed could be tremendous in a seek... while explanations by us will make you feel as if something of a very heavy load is put on the hardware.

ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top