(c#)How to implement a high performance duplicate check?
i want to find out a high performance duplicate check way. does anybody can help me ? i implement the check as the below, but now, i hope the speed can catch up sending message into a queue(MSMQ), so the old way is not fit with us .
my old way:
- create a simple table(oracle db)
- create PK on the column which i want to do the duplicate checking.
firstly, i will insert a record with try-catch into the table.
if(insert succeed)
{
not duplicate
}
else
{
duplicate
}
PS: the messages need to check is very large, so i can't record them in开发者_Python百科to the memory.
You could try something like managedesent
Check out the persistent dictionary implementation.
精彩评论