Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

88
Views
nodejs oracledb performance diff by the way of binding params

I wonder if there is a performance difference between below cases.

  • nodejs oracledb lib - express server

  • connection code - 1 query, 1 connection whenever I send a query, I always make a new connection. when data returned, I cut the connection.

return new Promise( async function ( resolve, reject ) {

            let result = [], conn = null

            try {

                conn = await oracledb.getConnection( {
                } )

                console.log( 'DB OPENED' )

                result = await conn.execute( query, bindParams, options )
                resolve( result )

            } catch ( e ) {

                console.log( ' ---- E: a_sendQuery ----' )
                console.error( e )
                console.log( ' ---- E: a_sendQuery ----' )

                reject( e )

            } finally {
                if ( conn ) {
                    try {
                        await conn.close()
                        console.log( 'DB CLOSED' )

                    } catch ( e ) {
                        console.log( ' ---- E: a_sendQuery: FINALLY ----' )
                        console.error( e )
                        console.log( ' ---- E: a_sendQuery: FINALLY ----' )
                    }
                }
            }

queries are

  1. bind value with query (select * from table where id = 1)
  2. bind as bindParams (select * from table where id = :id, let bindParams = [1])

as far as my understanding from this doc: https://www.zybuluo.com/WrRan/note/570707 it uses init query statement to boost up the performance. but I couldn't find any info about how to connect db and send query from examples. My senior said I have to fix all my code so that we can get more performance but .. I don't know. I'm not sure... does oracledb remember use init queries even connection is new..?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!