>>I haven't count it, but depending on which form calls it it should be either ~ 80 (for all departments) or ~ 20 (for particular department) or 1 (for a given user).
>>
>
>below 100 items you can use ASCAN() or IN() without penalty on performance.
>
Right, but which one is better? In order to use ASCAN or IN I have to create a IN string first, right? Or you're suggesting IN (select cUserID from ...)? Or both will give the same performance (JOIN vs IN (SELECT ...)) ?
>>iUsedID is a field in UsGrLink table, which corresponds to iID in Users table. I'm using cUserID for all other queries, since it's much more readable.. Users table has an index on both iID and cUserID.
>
>sorry, but i disagree fully here :)
>when you duplicate a field and an index, you are out of normalize table
>and increase very the possibility of errors due to not aligned data
>
>If you uses iUserId you can filter UsGrLink.iUsedID directly.
True, but unfortunately I could not. Besides, I may need cUserID as one of the return field.
If it's not broken, fix it until it is.
My Blog