cancel
Showing results for 
Search instead for 
Did you mean: 

node.js api driver takes too much of time to execute .

Ajithkumar
Node

Hi guys!
I am using node.js with neo4j-driver 5.1.
My query code block takes too long to execute, like 3 to 4 seconds. However, the actual query takes 5 ms to complete. browser or Neo4j desktop application .

 var session = neo4jConn.session({database:"neo4j"});
        const strtTime = new Date();
        var result = await session.executeRead(tx =>
            tx.run(`
                MATCH (loginUser:User {user_id: $userId})-[saved:saved]->(num1:Number)
                RETURN num1
                `,
                {   
                    userId:parseInt(userId),
                }
            )
        );
        await session.close();
        console.log(`${new Date()-strtTime} ms`);
  • That the measurements has done with 18K row of records.
0 REPLIES 0
Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online