Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Slow app on wireless network
Message
From
25/05/2012 16:16:54
Mike Yearwood
Toronto, Ontario, Canada
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01544312
Message ID:
01544452
Views:
48
>Thanks,
>
>Good information! I worked for so many years with SQL as the backend I've had to retrain my mind to use foxpro tables again. Lets say you do a browse command, what exactly does it bring? Only the records in view? If I remember correctly it progressively brings records across the wire progressively as more records come into view. So if I do a select * from customers where customer.id = 10 it will bring over only the record for client 10 if there's an index on customer.id? (like a client server application) and if there's no index on customer.id it will bring the entire table over because it needs to scan the entire table? little confused there.

I thoroughly agree with the others that you should use some kind of remote control software.

Just for edification: VFP with a browse/grid must be bringing the next gridful of records. This can be simulated with paging in SQL Server. If there is an index, if you do a select * from customers where customer.id = 10, it will bring some of the index file data down, then go back and get the record data.

Without the index, it will begin reading from the top and stop when it finds the record with customer id = 10.


>
>Thanks again.
>
>
>
>>>Thanks Mike,
>>>
>>>Can you expand on this?
>>>
>>>>VFP only brings the data across the wire, if it does not have the correct indexes, if you are using LOCATE / SQL. If the app is written that way, then you will be better off looking to add indexes to the tables to support the FOR and WHERE clauses.
>>>
>>>if I'm on a checkout laptop connection to the laptop with the data and I do a "use mytable" doesn't it bring all the records over the wire?
>>
>>Hi Roy
>>
>>This is unfortunately a far too common misconception. USE does not bring down all the records unless every record but the last one was deleted and you had SET DELETED ON.
>>
>>Even if you GO BOTTOM, it does not have to bring down all records. It just has to know how many bytes per record and how many records and jump directly to that byte in the file.
>>
>>HTH
>>>
>>>Thanks.
>>>
>>>
>>>
>>>>>Hello guys,
>>>>>
>>>>>I inherited a POS application that is having issues with speed. Basically there's one laptop who is the "server", it has all the data, and the other laptops are the "checkouts" which connect to the server via a wireless network and access the data, just the server and usually 1-3 checkouts. Of course one problem is that foxpro is bringing all the data over the wireless network and as more checkout laptops are added to the network it begins to crawl (even though the tables are not that big), actually adding just one checkout it crawls. The code is a combination of everything since a few programmers have had their crack at it.
>>>>>
>>>>>It would be nice to rewrite the app but that's not in the cards right now, just coding for new requirements, so my question would be what suggestions you guys have to try to make the checkouts faster? (code strategies/hardware changes/etc)
>>>>>
>>>>>Thank you.
>>>>
>>>>VFP only brings the data across the wire, if it does not have the correct indexes, if you are using LOCATE / SQL. If the app is written that way, then you will be better off looking to add indexes to the tables to support the FOR and WHERE clauses.
>>>>
>>>>SEEK uses indexes differently, and you may be able to really speed it up, but that can take some re-writing.
Previous
Reply
Map
View

Click here to load this message in the networking platform