开发者

(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:

  1. create a simple table(oracle db)
  2. 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜