Walter Meester
HoogkarspelNetherlands
General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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,
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only