Postgres.js with default settings doesn't play very nicely with Hyperdrive at the moment. We're planning a release to roll out in the next couple weeks that will help that significantly.
In short, postgres.js uses named prepared statements by default and that can cause several additional round trips depending on your query pattern.
For right now if you want to try testing again using node-postgres for best performance that's the best bet. You can also use
prepare: false
prepare: false
when setting up your connection with postgres.js to help ameliorate some of the performance penalty.
As to your use of transactions, that does mean you're likely not going to have great cache hit rates, but shouldn't cause issues otherwise.