Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Delete record is slow
Message
 
To
16/09/2003 12:59:49
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00829065
Message ID:
00829505
Views:
18
Thanks Mike
Good suggestion. Now that you mention it, I knew that tip.
Thanks for the rattle, it works for losts of other coding!

>There was a recent tip in FoxPro Advisor magazine that says Rushmore Optimization does not work with object properties. You could do as Fabio suggested and copy the entire array property to a regular array or you could do this:
>
>
SELECT propnum
>FOR i = 1 TO ALEN(.aRemovePN,1)
>  * delete the property number
>  lnProperty = .aRemovePN(m.i)
>  DELETE FOR nproperty = m.lnProperty
>ENDFOR
>
>
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform