> I've got a VFP dbf table with almost 150.000 records, large about 90 Mb. Not a big deal for VFP, but I noticed that in a multiuser environment the execution time of a SELECT-SQL command increased a lot just when the second user opens the same table.
>
> I've done a simple test. The table stays in the shared folder of Win 2003 server and the SET EXCL is OFF.
> I execute a command from VFP:
>
>
> SELECT * FROM myTable where .t.
>
>
> I put the "Where .t." in the statement because VFP "cheats" and doesn't really execute the SQL if it is a simple select * without where.
select * from table into cursor test NOFILTER
>
> Ok, the command finished in about 4 seconds which is an expected and good result.
>
> After that I just open the table on the second workstation with simple command
>
> use myTable shared
>
>
> Nothing special, I leave the table opened an returned to the first PC. On this machine I close the table and repeat the select clause:
>
>
> CLOSE DATA
> SELECT * FROM myTable where .t.
>
>
> The command needs
12 seconds to finish and it doesn't make any sense to me. Nothing special happens with the table or with network drive or server, but the time increased.
> I've made even larger table for testing and try with the SQL command which takes about 20 seconds with a single user access. The second user made this command unreasonable slow.
>
> Is there an explanation about it and how to prevent from this slowness?
No shared files such as databases should be using opportunistic locking.
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q129202Make a point of testing with at least two workstations as the norm.
Mike Yearwood
Microsoft MVP Visual FoxPro 2008
We have enough youth. We need a fountain of smart!
There may be many ways to skin a cat, but there are very few right ways to do it.