Though I agree about the RAM thing, using DBMS functions to process the data is not always faster. I've found
SELECT DISTINCT to be, on occasion, many times slower than feeding the output of a simple
SELECT into a hash.
This may have been an unusual case. I was retrieving distinct values of a single column from a table with about 125,000 rows from Empress, which isn't that much of a mainstream system. Still, I seem to remember using the Perl hash was more than 20x faster that letting Empress do the SELECT DISTINCT thing.
--
bowling trophy thieves, die!