pamtru


Hi i have a problem when running this query in shared mode or set exclu off.

update table set field=5

It is very slow in a network or mapped drive. The crazy thing is that if the mapped drive is to a directory in the local computer it is very slow too. Example

use c:\table shared

update table set field=5

this go allright but now let suppose that i shared the folder where my database an my ip is 192.168.1.1 (opening from the same computer where the database are)

use \\192.168.1.1\table shared

update table set field=5

it is very slow any idea . This occurs in vfp6 and 9 either.

Thanks

Pamela




Re: Problem when updating!!!! Help!!!

dni


It seems to be a network problem. Try to browse files with explorer on mapped drive to have an ideea of network speed. You may try "set multilocks on". You may check if REPLACE is faster.







Re: Problem when updating!!!! Help!!!

pamtru

No it seems network speed is fine but i dont understand why is slow if mapped drive is pointing to a local folder. I tried replace is faster but it locks me all the table even if y use the for clause any idea .

Thanks!!






Re: Problem when updating!!!! Help!!!

dni

You may try to map it from windows and assign it a drive letter...so, from vfp you may have:

use Z:\tablename shared where Z = new drive letter and check for user rights on new drive letter.






Re: Problem when updating!!!! Help!!!

pamtru

That is what i do, my databases are mapped into g:, but it is slow.

For example

c:\databases\data is where i have the databases

i share databases and mapped it into a drive.

to acces the database i use

set exclu off

open database dbname shared

use tblname shared

when i do the update commmand it is very slow but if i do

set defa to c:\databases\data

open database dbname shared

use tblname shared

the update commands run very quickly (less than a second).

Thanks.





Re: Problem when updating!!!! Help!!!

dni

You may need to have declared as default shared folder(it is normal and demanded) and have set multilocks on. If you have index file it is better to have them on local hard disk. You may use also set opti on.




Re: Problem when updating!!!! Help!!!

pamtru

how can i declared it as deault shared folder

Thanks.

Pamela





Re: Problem when updating!!!! Help!!!

dni

You done it :

SET DEFAULT TO c:\databases\data (if drive + path are shared folder)

before use.






Re: Problem when updating!!!! Help!!!

pamtru

i have the same problem it takes bout 10 seconds to do the update command (about 20000 records) if i do it opening in the mapped drive and 0 .22 seconds if i execute locally. i dont know why, because the mapped drive is pointing to a local folder (but i need to do a mapping because it will on a network).

thanks pamela





Re: Problem when updating!!!! Help!!!

dni

It is normal. Updating via network take more time, depending on protocol used and network speed. Packets are sent over network even drive is locally mapped. If you consider that it takes too much time you may tune up table access using:

1.Set multilocks on

2.Set defa to NetworkDrive

3.Set optimize on (rushmore)

4.Index tables on local disk drives

5.You may consider using buffering






Re: Problem when updating!!!! Help!!!

Naomi Nosonovsky

I have an idea, though not tested. You may obtain the actual local path through FileScriptingObject and reference this table using local path. I believe the performance would be better this way.