3 ms·
Nodejs Sequelize is transparently doing this when ping connection. That aside, I wonder why you need to keep the connection alive for > 30 mins, while usually
by fendy3002 7y ago
Nodejs Sequelize is transparently doing this when ping connection.
That aside, I wonder why you need to keep the connection alive for > 30 mins, while usually sql con is short lived. Why can't you just close and reopen them, is it temporary table?
- zbentley 7y agoNot the GP, but I assume transactional consistency was important for the report, hence the need to keep the connection alive. That's a pretty common situation.
- fendy3002 7y agoDoes it means the report take the tables hostage for 30+ minutes? How can transactional consistency be achieved without write lock? Temporary table?
- blattimwind 7y agoMVCC.
- CodesInChaos 7y agoReporting can typically be split into two transactions. One long-running readonly transaction with snapshot consistency obtaining the data for the report and a separate transaction which publishes the result.
- kyllo 7y agoSQL connections can be arbitrarily long-lived. ETL processes and other data-intensive jobs often take multiple hours.
- fendy3002 7y agoOP said it need to sleep for 30+ minutes. Is it common for connection to idle for half hours for etl processes?