0

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 into the memory.

Yet Another Geek
  • 4,251
  • 1
  • 28
  • 40
  • 1
    what is the type of data you want to check? int, string? – Optillect Team Jun 14 '11 at 06:32
  • Do you have a huge number of messages that need to be checked, or are the messages themselves very large? Just asking as the latter might not preclude in-memory checking. – Will A Jun 14 '11 at 06:39

1 Answers1

3

You could try something like managedesent

Check out the persistent dictionary implementation.

Andrew
  • 5,215
  • 1
  • 23
  • 42