Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why this DELETE is so slow?
Message
 
À
21/02/2005 15:33:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
00988740
Message ID:
00989008
Vues:
63
>>No difference
>>
>>It runs slow if all 3 of these conditions are present:
>>1. It involves nested SELECT
>>2. The files are open in at least one more VFP session
>>3. No FLOCK is issued on the file being updated (or deleted from)
>>
>>Why?

>This is a interesting issue.
You bet!

>On my last post, the nested SELECT is a exclusive cursor,
>then the nested table is out.

It is DELETE FROM "networked_table" WHERE IN (SELECT ... FROM "No_Matter_What")
See also the first post in this thread for all the things I tried

>Point 1.
>* try
>BEGIN TRAN
>DELETE ..... JOIN ....
>END TRAN

No difference

>Point 2. Simulating this with 2 cursors,
>the Rushmore report print a Intermediate optimization step,
>but i don't look this into your Rushmore report.

I know...

>Point 3.
>The Deleted table is a local table or a LAN table ?
>Can you do the job into the table's machine ?

LAN. I tried locally and it does make a difference! Unfortunately I cannot run my app like that :).

For what it's worth, this confirms my original guess that it has to do with how VFP performs updates on network. But I still don't know why?
Hugo Ranea in his post suspected that VFP has to RLOCK each record in the table being updated... But, if that's the case, what makes it do it? Nested Select?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform