strongloop / strong-oracle

Deprecated: Node.js Driver for Oracle databases (Use https://github.com/oracle/node-oracledb instead)
Other
45 stars 18 forks source link

connection setPrefetchRowCount not working as of 1.6.0 #30

Closed designsinnovate closed 9 years ago

designsinnovate commented 9 years ago

Hi,

Up until version 1.5.1, connection.setPrefetchRowCount worked as expected. Getting a 1000 rows with prefetch of 500 took less than a second.

From v1.6.0 onwards, it seems like this setter has no effect. Getting the same 1000 rows now takes over a minute - the same time as it was taking in 1.5.1 without setting the prefetch row count.

Please have a look - I noticed quite a few changes in connection.cpp revolving around prefetch logic.

Thanks.

raymondfeng commented 9 years ago

Please try 1.6.2 release.

Thanks,


Raymond Feng Co-Founder and Architect @ StrongLoop, Inc.

StrongLoop http://strongloop.com/ makes it easy to develop APIs http://strongloop.com/mobile-application-development/loopback/ in Node, plus get DevOps capabilities http://strongloop.com/node-js-performance/strongops/ like monitoring, debugging and clustering.

On May 4, 2015, at 3:14 PM, drashid notifications@github.com wrote:

Hi,

Up until version 1.5.1, connection.setPrefetchRowCount worked as expected. Getting a 1000 rows with prefetch of 500 took less than a second.

From v1.6.0 onwards, it seems like this setter has no effect. Getting the same 1000 rows now takes over a minute - the same time as it was taking in 1.5.1 without setting the prefetch row count.

Please have a look - I noticed quite a few changes in connection.cpp revolving around prefetch logic.

Thanks.

— Reply to this email directly or view it on GitHub https://github.com/strongloop/strong-oracle/issues/30.

designsinnovate commented 9 years ago

The following additional change fixed the issue in 1.6.2

After some digging into the code, found this line commented out in reader.cpp

// baton->count = baton->connection->getPrefetchRowCount();

Replacing with following line fixed the issue.

baton->count = baton->m_prefetchRowCount;

baton->count is being used in EIO_NextRows method.

Hope that helps.

raymondfeng commented 9 years ago

@designsinnovate How could I miss that? Anyway, it's fixed in 1.6.3.