× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Node.js on the IBMi generally performs poorly in comparison to windows/unix in my experience. It might not be just the db2 adaptor.


[https://www.netcracker.com/assets/img/netcracker-social-final.png] ƕ
On 12 Feb 2017, at 18:20, Henrik Rützou <hr@xxxxxxxxxxxx> wrote:

Hi,

I've used all the weekend to do performance test on IBMi vs Win and must
say that
the new DB SQL connector db2a (introduced with node V4) performs badly, here
is som figures:

OS, Servertype, Client, Datasource, Runtime, Roundtrip

W, node.js, localhost, IFS, 1ms, 12ms ( zdemo01.js )

W, node.js, remote, IFS, 1ms, 25ms, ( http://powerext.org/proxy/zdemo01.js )

i, node.js, remote, IFS, 1.8ms, 35ms, (
http://5.103.128.110:6382/nodeproxy/zdemo01.js )

i, node.js, remote, DB2/SQL, 80ms, 125ms (
http://5.103.128.110:6382/nodeproxy/zdemo06.js )

i, CGI/YAJL, remote, DB2/SQL, 1.2ms, 46ms (
http://5.103.128.110:6382/pextcgicor/jonyajl.pgm )


W - Intel i3-3240, 3.4Ghz, 2core, 16GB-ram, Windows7
i - Power6, 4.2Ghz, 1core, 3GB-ram, V7R1M0, 20% cpu LPAR

Am I doing something wrong, my DB code is as follow:

// Input from DB2
var db = require('/QOpenSys/QIBM/ProdData/OPS/Node6/os400/db2i/lib/db2a');

var sql = "SELECT * FROM QIWS.QCUSTCDT FOR READ ONLY";

var sqlresult = ''; // The result of the SQL Query

var dbconn = new db.dbconn(); // Create a connection object.
dbconn.conn("*LOCAL"); // Connect to a database.
var stmt = new db.dbstmt(dbconn); // Create a statement object of the
connection.
stmt.prepareSync(sql); // Run the SQL
stmt.executeSync();
stmt.fetchAllSync(function callback(result) {

sqlresult = JSON.stringify(result, null, '\t');
delete stmt; // Clean up the statement object.
dbconn.disconn(); // Disconnect from the database.
delete dbconn; // Clean up the connection object.
});


--
Regards,
Henrik Rützou

http://powerEXT.com <http://powerext.com/>
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.




________________________________
The information transmitted herein is intended only for the person or entity to which it is addressed and may contain confidential, proprietary and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.