Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete record is slow
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00829065
Message ID:
00829092
Vues:
21
Sergey
That did not make a difference. I noticed the delete code takes 5.37sec and the requery takes 5.29sec. The "use view in 0" in the load event is taking 7.48sec. There are 7 indexes on the propnum table if that makes a difference.

A separate question: how can I get the 'showline/column position' in edit-properties to be active when i open any prg/form/class?

>Chuck,
>
>It shouldn't take so long to delete 1 record if there's index on nproperty. Another thing that could slow it down, is index order set on the table. Try
SELECT propnum
>SET ORDER TO
>...
>
>
>>Sergey
>>There are from 1 to maybe 100 items at given times in the array. Most of the time there is only 1. thisa particular time there is only 1, that is why I am concerned this app may die if the array hits 50. there is an index on nproperty as a PK. This function runs when a record is canceled. I use the array to keep a pointer to the number that the user canceled so that I can reset my nextid table back to the correct nextid number.
>>
>
>>>
>>>Do you've index on 'nproperty'? How many items are in .aRemovePN array in each case?
>>>
>>>>Would anyone have an idea to why this code runs so slow. I think I may not be removing records from a view correctly. I couldn't get the view to update unless I deleted the record directly from the table. It takes 7sec on 33000 records, 5sec on 10000 records.
>>>>
>>>>	SELECT propnum
>>>>	FOR i = 1 TO ALEN(.aRemovePN,1)
>>>>		* delete the property number
>>>>		DELETE FOR nproperty = .aRemovePN(i)
>>>>	ENDFOR
>>>>        SELECT view
>>>>        REQUERY()
>>>>
Extreme Programming = Plan -> Design -> Code -> Test
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform