in reply to Querying a Hash like a database

Note that a hash doesn't have the built-in complex query optimisations of a real database engine, so even if you manage to find a SQL wrapper that supports advanced SQL stuff - like joins, aggregates, advanced indexing (beyond "exact match"), range queries etc. - it doesn't mean it will run fast.

Maybe you should take a look at DBD::SQLite

Update: I second TedPride's comment - you should review your indexes. Many database performance problems are due to improper indexing.