Cross posted from SAS Procedures: The performance problem is caused by the combinatorials. You have 7,000,000 control records: - for the sake of simplifying the math, let's assume they split evenly among age, so you'll have 70,000 records for each year of age (1 to 100); - two sexes divides it by two, so for every year of age you'll have 35,000 females, and 35,000 males; - and you want the controls that have the age of case, the age of case plus one, and the age of case minus one; It looks to me like you should be expecting 35,000 times 3, or 105,000 records, per case; in your example of 65,000 variables, you should be expecting 6.8 billion result records total. In your other requests, you had more variables, so you had fewer candidate controls per case. I think that this may explain your terribly slow performance. Now, the question is what do you want to do to reduce the amount of processing? Tom P.S. I suggest you close one of the threads, and have everybody move to the other.
... View more