If you were doing INSERTs or UPDDATEs, I'd tell you to use transactions rather than auto-commit, but I only see SELECTs. Another option, since you have tons of RAM, is to load the whole thing into hashes in memory and do all the lookups in perl. If you don't want to do that, I'd suggest switching to MySQL. SQLite is incredibly convenient, but it's not as fast.