in reply to A profiling surprise ...
Yes, the bottleneck is database interaction.
As you continue to write Perl programs that interact with a database, this will cease to surprise you.
You're on the right track: keep thinking of ways to shift the burden away from the database.
In Section
Seekers of Perl Wisdom