I am wondering is it normal to know the duration of a connected database session, from the time a database connection was established to the time the connection was terminated. Considering the fact of using the database pool.
I thought this is a common user case, but after googling a while, I am surprised to find that most database products does not have this information.
I am not interested in the Timeout option due to the fact it is a different user case.
I'd say most databases have tools to query active transactions and their age. But if you're speaking about past transactions, then I'm not sure. In any case, it would be heavily database dependent.
Does your database provide some sort of performance reports? If it does (which is probable), my advice would be to read the documentation about these reports to see whether something like this is included in them. If it isn't, my guess is that the database doesn't track it. One of measurements usually tracked by databases is number of transactions per seconds (TPS), but this is completely unrelated to their duration.
Catch Ernie! Catch the egg! And catch this tiny ad too: