Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

What should one prefer while using node-oracledb – Using one connection for all routes or getting connection from pool for each route and then close?

I am working on a node-express project and wanted to have a guide on what is more preferable
Using one database connection for all routes or getting connection from pool for each route and then closing it?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

You want to use a connection pool, because while one connection is busy by receiving or sending data, another can be used from the pool and perform more work. Thus, it improve overall performances.

It’s something you can’t do with only one connection.

You create your pool when program start, then request a connection in your route and release it when the route have done its work.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading