Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow Query Response #364

Closed
hectotruj opened this issue Feb 15, 2018 · 7 comments
Closed

Slow Query Response #364

hectotruj opened this issue Feb 15, 2018 · 7 comments

Comments

@hectotruj
Copy link

Issue

Query response takes too long

Situation

A query I ran on the DB2 dashboard, and then again on DBeaver, returns in less than 2 seconds. However, it takes about 17 seconds in Node using this library.

Data

The data being returned contains about 50k rows

@hectotruj hectotruj changed the title Slow Query Slow Query Response Feb 15, 2018
@rhtpandeyIN
Copy link
Contributor

Hi @hectotruj , Can you please share some repro test case for the issue, what exact query you are trying to run? is it same for every query or for some queries?

If you are comfortable to provide time difference log/data/output, please provide it as well.

Thanks.

@hectotruj
Copy link
Author

hectotruj commented Feb 19, 2018

Hi @rhtpandeyIN , thanks for reaching out. I'll ask how much I can share but its essentially:

SELECT someprops FROM TABLE1 t1
inner join TABLE2 t2 on t1.id = t2.t1id
inner join TABLE3 t3 on t2.id = t3.t2id
inner join TABLE3 t4 on t3.id = t4.t3id
inner join TABLE3 t5 on t2.id = t5.t2id
WHERE t1.someprop = ? AND t4.id = ?

UNION

SOMETHING SIMILAR TO THE FIRST QUERY

We know the query works, but if I log the time from Node I get query: 13324.090ms, while the DB2 dashboard returns Run time: 3.002430327s

@rhtpandeyIN
Copy link
Contributor

Thanks for providing the information, but to make sure this is because of node-ibm_db particular version, we need more data/information.

Would you be able to help us, if I request you to check the same query with different node versions, and with different node-ibm_db versions?
At least few cases:

  1. latest node-ibm_db with node 8.X, node 7.X and node 4.X
  2. node-ibm_db version which you are using (if not latest), with node 8.X, 7.X, 4.X
  3. node 8.X, 7.X, 4.X with node-ibm_db previous releases.

Above information will be required to analyse/determine the exact issue, and thanks in advance for your help.

@Louis-7
Copy link

Louis-7 commented Mar 7, 2018

I'm using node 4.x with ibm_db2 0.0.19, having same issue. So I'm trying to upgrade ibm_db2 but I met several errors when execute query.

@Louis-7
Copy link

Louis-7 commented Mar 8, 2018

I tried to upgrade ibm_db to 1.0.0/2.0.0/2.2.0, all these version have slow response. Much slower than execute SQL in Data Studio (GUI).

@hectotruj
Copy link
Author

Hi @rhtpandeyIN , I apologize, but we haven't had the time to test it and I'm not sure we will anytime soon. But it seems @Louis-7 is also having the same issue. And is a problem that has come up before
Node 6.x/8.x slower timings with ibm_db than Node 4.8.3 #269

@rhtpandeyIN
Copy link
Contributor

As per the discussion with Ziyad closing the issue. (Issue not exist anymore).
Please feel free to reopen or comment below in case of further queries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants