in reply to hash or tables...
Databases are there to be hit, so hit it. You're talking about an optimization with meager benefits and it seems without any justification save for a few charactors in your SQL statement. Your join is the correct way to do it.
"The dead do not recognize context" -- Kai, Lexx
In Section
Seekers of Perl Wisdom