At 08:15 2018-01-25, mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
On 2018-01-24 18:39, Fernando D. Bozzo wrote:
When the index is evaluated initially, VFP knows exactly what fields affect what index, so really just affected indexes are updated. It's easy to test it. just make an old index (IDX) on two different fields: CREATE TABLE test (field1 C(10), field2 I) INDEX on field1 TO test_f1 additive INDEX on field2 TO test_f2 additive Add some data, wait a minute, replace one of the fields and do a FLUSH FORCE, and you will see that only the affected index changes his timestamp.
I don't think that's a fair test to use IDX files since this example uses a CDX file, and it's all in the same file.
I think it *is* a fair test for exactly that reason. If you see only one of the IDX index files change, that suggests that VFP only updates an index where it would make a difference.
I grant that it could be that that optimisation does not exist in the CDX handling, but how likely do you think that is?
Sincerely,
Gene Wirchenko
On 2018-01-25 13:51, Gene Wirchenko wrote:
At 08:15 2018-01-25, mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
On 2018-01-24 18:39, Fernando D. Bozzo wrote:
When the index is evaluated initially, VFP knows exactly what fields affect what index, so really just affected indexes are updated. It's easy to test it. just make an old index (IDX) on two different fields: CREATE TABLE test (field1 C(10), field2 I) INDEX on field1 TO test_f1 additive INDEX on field2 TO test_f2 additive Add some data, wait a minute, replace one of the fields and do a FLUSH FORCE, and you will see that only the affected index changes his timestamp.
I don't think that's a fair test to use IDX files since this example uses a CDX file, and it's all in the same file.
I think it *is* a fair test for exactly that reason. If you seeonly one of the IDX index files change, that suggests that VFP only updates an index where it would make a difference.
I grant that it could be that that optimisation does not exist inthe CDX handling, but how likely do you think that is?
Perhaps a better question at this point: Does the CDX file get pulled down locally for every query? I would think for ADD/UPDATE/DELETEs, it would get updated on the LAN. (In this scenario, the database is on a network folder; not local.)
My memory is the CDX is sent as soon as you open the table along with the header from the DBF? I bet Christof knows all the details... š
--
rk
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of mbsoftwaresolutions@mbsoftwaresolutions.com Sent: Thursday, January 25, 2018 2:03 PM To: profoxtech@leafe.com Subject: Does the CDX file travel across the network for each time a field that can use an index is queried/updated/deleted/added? (was Re: Indexes on VFP tables--when do they get updated)
Perhaps a better question at this point: Does the CDX file get pulled down locally for every query? I would think for ADD/UPDATE/DELETEs, it would get updated on the LAN. (In this scenario, the database is on a network folder; not local.)
No the CDX doesn't get pulled locally when you open it or when you amend records.
You can test this by opening a table on the LAN in VFP, then running Sysinternals Process Monitor and filtering to process name = VFP9.EXE and path ends with .CDX.
Then do some seeks and updates and you will see that it is just reading/writing chunks of the CDX on the LAN.
Obviously if you're not taking advantage of Rushmore optimisation it will be doing big, time consuming scans of the DBF instead.
I see a potential problem when multiple users are doing updates on the same table. What constitutes the server file to be updated? How do the localized cdx files know to update when the server version is updated?
On Thu, Jan 25, 2018 at 12:51 PM, Gene Wirchenko genew@telus.net wrote:
At 08:15 2018-01-25, mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
On 2018-01-24 18:39, Fernando D. Bozzo wrote:
When the index is evaluated initially, VFP knows exactly what fields affect what index, so really just affected indexes are updated. It's easy to test it. just make an old index (IDX) on two different fields: CREATE TABLE test (field1 C(10), field2 I) INDEX on field1 TO test_f1 additive INDEX on field2 TO test_f2 additive Add some data, wait a minute, replace one of the fields and do a FLUSH FORCE, and you will see that only the affected index changes his timestamp.
I don't think that's a fair test to use IDX files since this example uses
a CDX file, and it's all in the same file.
I think it *is* a fair test for exactly that reason. If you see onlyone of the IDX index files change, that suggests that VFP only updates an index where it would make a difference.
I grant that it could be that that optimisation does not exist in theCDX handling, but how likely do you think that is?
Sincerely,
Gene Wirchenko
[excessive quoting removed by server]
I think VFP figured out how to handle multi-user concurrent updates a long time ago... At least until MS broke SMB... Multiple times... š
--
rk
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Stephen Russell Sent: Thursday, January 25, 2018 2:05 PM To: profoxtech@leafe.com Subject: Re: Indexes on VFP tables--when do they get updated
I see a potential problem when multiple users are doing updates on the same table. What constitutes the server file to be updated? How do the localized cdx files know to update when the server version is updated?
On Thu, Jan 25, 2018 at 12:51 PM, Gene Wirchenko genew@telus.net wrote:
At 08:15 2018-01-25, mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
On 2018-01-24 18:39, Fernando D. Bozzo wrote:
When the index is evaluated initially, VFP knows exactly what fields affect what index, so really just affected indexes are updated. It's easy to test it. just make an old index (IDX) on two different fields: CREATE TABLE test (field1 C(10), field2 I) INDEX on field1 TO test_f1 additive INDEX on field2 TO test_f2 additive Add some data, wait a minute, replace one of the fields and do a FLUSH FORCE, and you will see that only the affected index changes his timestamp.
I don't think that's a fair test to use IDX files since this example uses
a CDX file, and it's all in the same file.
I think it *is* a fair test for exactly that reason. If you see onlyone of the IDX index files change, that suggests that VFP only updates an index where it would make a difference.
I grant that it could be that that optimisation does not exist in theCDX handling, but how likely do you think that is?
Sincerely,
Gene Wirchenko
[excessive quoting removed by server]
_______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CAJidMY+bKhtfZuKEzcG8WLW5sx+ku8D=+85r... ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Report [OT] Abuse: http://leafe.com/reportAbuse/CAJidMY+bKhtfZuKEzcG8WLW5sx+ku8D=+85r3O2E7GUW-v...
Yeah, and that's why DBF files can be easily corrupted: You have many clients trying to update the same files remotely over a network. Any network microcut, any client virus or any client that collapse or reset is a potential contributor to write bad info, resulting in the well known file corruption, being some of the worst those that passes unseen (corrupted data that does not corrupt the file structure) but that soon or later you will find.
This problem is more noticed starting from Windows greater than 2003/XP, for wich the SMB protocol have changed, privileging fast througputs and optimizations for HTTP protocols at the expense of the now deprecated ISAM files access.
2018-01-25 20:04 GMT+01:00 Stephen Russell srussell705@gmail.com:
I see a potential problem when multiple users are doing updates on the same table. What constitutes the server file to be updated? How do the localized cdx files know to update when the server version is updated?
On Thu, Jan 25, 2018 at 12:51 PM, Gene Wirchenko genew@telus.net wrote:
At 08:15 2018-01-25, mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
On 2018-01-24 18:39, Fernando D. Bozzo wrote:
When the index is evaluated initially, VFP knows exactly what fields affect what index, so really just affected indexes are updated. It's easy to test it. just make an old index (IDX) on two different fields: CREATE TABLE test (field1 C(10), field2 I) INDEX on field1 TO test_f1 additive INDEX on field2 TO test_f2 additive Add some data, wait a minute, replace one of the fields and do a FLUSH FORCE, and you will see that only the affected index changes his timestamp.
I don't think that's a fair test to use IDX files since this example uses
a CDX file, and it's all in the same file.
I think it *is* a fair test for exactly that reason. If you seeonly
one of the IDX index files change, that suggests that VFP only updates an index where it would make a difference.
I grant that it could be that that optimisation does not exist inthe
CDX handling, but how likely do you think that is?
Sincerely,
Gene Wirchenko
[excessive quoting removed by server]