From: Vasyl Smirnov Date: 2007-11-03T03:17:19+09:00 Subject: Re: Database speed issues On Nov 2, 7:45 pm, "JeremyWoert...@gmail.com" wrote: > So, I have a bit of a design problem. I have an application that work, > but not as well as I would like it to. My problem is that I had to > write an application that checks millions of records against hundreds > of millions of records to see if there are any duplicates. The only > way I could think to do this is pretty much select from the different > tables where the specific column matches my search string. This is > really slow! Obviously if it returns something, then there is a dup, > if not, then YAY! > > I know there has to be a better way then just doing a SQL select > statement. Any ideas? > you could sort both lists, and find duplicates using O(n + m) time.