Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Delete lots, slow cascade
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00189428
Message ID:
00190043
Views:
18
When I leave table1 related to just one of the children, the DELETE FROM table1 takes 15 or 20 minutes. The parent table1 has 6555 records. The children table2 and table3 have 5702 and 3688 records. When table1 is related to table3, the DELETE takes longer, and may be cascading a larger portion of the records in table3. But both deletes take a long time. I use a Pentium 200 with 64MB RAM on a Win NT 4 network that isn't overburdened. How long should I expect it to take? Could the RI code generator be doing something wrong?

After several attempts last Friday, I copied a similar dataset from another network drive, just in case mine was corrupted. The results were similar.

What is the right way to do this? I know that deleting a majority of records in a table is not a routine operation, but I need to do it from time to time. If I had a few million records instead of a few thousand, any cascade would be impossible.

>Right.
>Can you take the RI off one of the children at a time and see which is causing the slowdown?
>
>>I have SET('DELETED') = OFF
>>I have indexes on DELETED() but not on !DELETED()
>>SYS(3054,1) reports full optimization.
>>
>>>Bret:
>>>Do what is SET('DELETED')=?
>>>Do you have an index on !DELETED()?
>>>Have you turned on SYS(3054,1) to check rushmore optimization?
>>>
>>>>I need to delete a large portion of a parent table which has some child tables. RI is set to cascade these deletes. The delete processes very slowly and never seems to finish. It looks like
>>>>
>>>>DELETE FROM mytable WHERE mytable.group <> "rightgroup"
>>>>
>>>>I have indexes on all the keyfields and on the group field. The main table has about 5000 records, and the two child tables have a few thousand and several hundred each.
>>>>
>>>>I did this before without any trouble. I don't remember what I did differently, except that I was using vfp3 instead of vfp6.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform