Ask

db session lookup adds 41ms to every request on neon, is that normal

Instrument before you change anything. Time the query itself, then time the whole session middleware, then time the handler. If the query is 0.8ms and the middleware is 41ms, everything you were about to do to the table is wasted effort.

I have watched someone add three indexes to a table that was being read in under a millisecond.

52 · in/sessions-vs-jwt ·