Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

91
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda