B
Bob
I'm trying to determine whether a given record already exists in a
database table. Each record is rather short, about 10 fields, approx
250 chars or so, but there are quite a few of them. I'm updating the
table by going through a long list of new records, pretesting to see
if the older record exists (possibly clumsily), and noticing that the
test itself seems to be chewing up CPU.
It occurred to me that I might preload the old, existing records, and
build a hashtable of their PKs in C#-space. Then test against the
hashtable rather than going to the DB. Is this likely to speed things
up? Is there a better way?
database table. Each record is rather short, about 10 fields, approx
250 chars or so, but there are quite a few of them. I'm updating the
table by going through a long list of new records, pretesting to see
if the older record exists (possibly clumsily), and noticing that the
test itself seems to be chewing up CPU.
It occurred to me that I might preload the old, existing records, and
build a hashtable of their PKs in C#-space. Then test against the
hashtable rather than going to the DB. Is this likely to speed things
up? Is there a better way?