>Well, as usual, the computer mistake ... not mine, of course. Clients usually believe this. The index for the name was compound ... for some reason that only God knows, it was name+code
The classic "Name+Code" mistake <s>. Sometimes young Ivan, you must look for the obvious and not take things for granted -- like surfing and women
.
>Once we are on the subject of indexes, do you create the Deleted() for all tables ? I've read different opinions about this. I haven't done so, but was thinking if this would make it even faster.
Well, I think it is taken for granted nowadays that you do not create an index on deleted for speed reasons -- for more information send a message to Walter Meester. He is well up on this subject. Obviously, if you want to re-use deleted record, then its OK to have an index on deleted. FWIW, I have plenty of tables with a "deleted" index but I tend no to do that any more.
Glad you sorted your problem out.
Best
-=Gary