Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to find orphans - seek vs SQL
Message
 
 
To
23/11/2000 23:20:43
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00444141
Message ID:
00445115
Views:
22
Hi Walter,

I read your messages about no benefit of deleted() tag. I read the thread started by Andris Moore (may misspell his name). Anyway, currently we have deleted() tag in all our tables. Query speed is far from ideal, but we're working on it. Set deleted is on in the main program and Base form class Load.

I may try to make the experiment, you suggested, on the smallest database (RI). TranMstr describes transactions and PropMstr describes property. PropMstr is a parent and TranMstr is a child. For MA TranMstr has about 5mln. records and PropMstr about 4 mln.

So, are you saying, that
scan for condition
endscan

and
scan
if condition
endif
endscan

is the same? I'm not sure.

For CT your solution took ~2min. and it has 3mln/2mln records.
If I would scan 3mln records, I think, it should take longer, than 2min.

Anyway, I may run couple of tests on Monday, if I'd have time.
>Nadya,
>
>>The idea was to avoid scan the whole table :) The scan of table containing 4mln. records may take a long time :) I better give up the idea of timer.
>
>In the former solution it also scans the whole table (Even if the scan has a FOR clause). You may try to add an key index filtered FOR !DELETED() on table2 and try the code. I'll bet you would be surprised with the result. The overhead of the two IF statements are not that significant: I would be surprised it it took more that one or two seconds in the end (= 4 mln records)
>
>B.T.W. I notied the difference between SET DELETE ON and SET DELETE OFF. Are you using a DELETED() Tag on Table1 ?
>
>Walter,
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform