>Nadya,
>
>>Just suddenly I thought about one solution here, which can help. What if before deletion we would assign KeyID=-KeyID? In this case, all deleted records would have negative IDs and then your solution would work. Do you think it's an interesting idea, which I can probably discuss between our team members?
>
>Hmmm, a few members of the UT already practise this to overcome a uniqueness pk violation. Yes, this works. However I still think that a primary (or candidate) index filtered on DELETED() might be a better solution.
Walter,
If we want to take your route, we have to have two indexes. One with filter and another without for Rushmore. For 5mln. records table I don't think, it's good to add this index. My idea looks interesting to me (though it would require some code changes, I believe), but I haven't proposed it yet between our team members. Curious, what other UTrs think about it.
Thanks.
If it's not broken, fix it until it is.
My Blog