Why is my Spring Data JPA query 8 times slower than Node.JS + oracledb?

My first thought is a difference in array fetch size or prefetch size. This can have a big impact on multi-row query performance over WANs.

From Oracle® Database JDBC Developer's Guide:

By default, when Oracle JDBC runs a query, it retrieves a result set of 10 rows at a time from the database cursor

From node-oracledb Documentation:

This property sets the size of an internal buffer used for fetching query rows from Oracle Database. Changing it may affect query performance but does not affect how many rows are returned to the application.

The default value is 100.

You can easily change oracledb.fetchArraySize to 10 in the Node.js app and see if performance drops to Spring's.

And you can increase the size to see if you get better performance.