One key issue: did you run the PROC SORT before running SQL? If so, it's not really a fair comparison. SQL will change its joining method to take advantage of the sorted order. Regarding outcome #3, you have to picture how SAS extracts observations. It moves an entire page of data into memory, then extracts the observations from memory. When you use an index, most of the work is swapping pages into memory to get the right page that contains the next observation. Don't use an index to read every observation! Ian Whitlock once wrote a short, related paper called something like "Why Did This Code Take 24 Hours to Run?" Good luck.
... View more