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

Performance difference in prepared statements compared to Open Source jTDS due to BigDecimal #1749

Closed
dospencer opened this issue Feb 3, 2022 · 5 comments

Comments

@dospencer
Copy link

Driver version

SQL Server version

Microsoft SQL Azure (RTM) - 12.0.2000.8 Sep 18 2021 19:01:34 Copyright (C) 2019 Microsoft Corporation

Client Operating System

Windows

JAVA/JVM version

java version "11.0.9" 2020-10-20 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.9+7-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.9+7-LTS, mixed mode)

Table schema

Problem description

  1. Expected behaviour: Insert of 85K records in less than 1 minute.
  2. Actual behaviour: I encountered a performance issue with the MS JDBC driver. It takes about 39 minutes to insert 85K records into a MS SQL Server table using the MS SQL Server driver. If I use the Open Source JTDS driver then it takes only 39 seconds. The issue is only occurring when I have fields defined as BigDecimal in the application and that generates setBigDecimal for the prepared statement. If I change the data type from BigDecimal to Int, Float or Double, I do not get that performance issue.
  3. Error message/stack trace:
  4. Any other details that can be helpful:

JDBC trace logs

Reproduction code

@lilgreenbird
Copy link
Contributor

hi @dospencer
Could you please provide the schema and the code to repro the issue?
Thanks

@Jeffery-Wasty
Copy link
Contributor

Jeffery-Wasty commented Mar 3, 2022

This issue has been inactive for almost 4 weeks, so we'll go ahead and close. @dospencer, if the issue persists, let us know, and we can re-open the issue.

@vwarchu
Copy link

vwarchu commented Mar 11, 2022

@Jeffery-Wasty We should determine if this is A) Reproducible as a generic case, and B) Related or duplicate of issue #1489

@vwarchu vwarchu reopened this Mar 14, 2022
@tkyc
Copy link
Member

tkyc commented Mar 25, 2022

Hi @dospencer, could you provide more details to your issue? eg. table schema, queries used, code, driver version. If possible a small simple repro app would be a big help as I was unable to repro the problem on my end. Thanks.

@tkyc
Copy link
Member

tkyc commented Apr 4, 2022

Closing as it's been inactive, feel to re-open as necessary.

@tkyc tkyc closed this as completed Apr 4, 2022
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

5 participants