question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Significant performance degradation in SQLServerDatabaseMetadata in 6.4.0

See original GitHub issue

Driver version or jar name

I’m using the 6.4.0.jre8 in comparison to the 6.2.2.jre8.

SQL Server version

Microsoft SQL Server 2012 - 11.0.5343.0 (X64)

Client operating system

Microsoft Windows 10 Pro (10.0.16299)jav

Java/JVM version

Java HotSpot™ 64-Bit Server VM (build 25.144-b01, mixed mode)

Problem description

After upgrading the driver from 6.2.2.jre8 to 6.4.0.jre8 I encounter a serious performance degradation in querying the metadata of the database.

The following screenshot is from the opensource tool symmetricds with the 6.2.2.jre8 driver, where you see a total execution time of 44 seconds for a method.

image

In the second screenshot you see the same code just with using the 6.4.0.jre8 driver, you can see that the total execution time is now 2 times slower (128 seconds).

image

If you tear down the callstack you’ll see that the difference is in the sql server jdbc part where in the later screenshot the getImportedKeys is a lot slower than in the 6.2.2.jre8 version.

Expected behavior and actual behavior

I’d expect that the two drivers should behave equally. At least I don’t expect a performance penalty of 200%.

Repro code

https://github.com/JumpMind/symmetric-ds you have to replace the driver with mssql-jdbc.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:19 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
rene-yecommented, Apr 12, 2018

I’ll look into some other options for the prepared statement, but other than that I’ll create the PR in the near future. Thanks for all your time and help.

1reaction
rene-yecommented, Apr 10, 2018

I’m going to try that right now and see if it resolves some issues I had with drop. It seems to work just fine on SSMS and I’m going to use it over creating a temp table if I can.

Edit: It seems to work just fine, going forward with the implementation. It’s probably going to be awhile before I can create a PR for this issue as it has brought some problems into light, and I’d like to address all of them before proceeding.

Read more comments on GitHub >

github_iconTop Results From Across the Web

serialized form - mssql-jdbc 11.1.0.jre8-preview javadoc
Active streams which must be closed when the Blob is closed Initial size of the array is based on an assumption that a...
Read more >
Poor read-performance with mssql-jdbc 6.4.0 JDBC driver ...
We have been converting our server from using Hibernate 4.2 to Hibernate 5.2. Hibernate 5.2 requires JDBC 4.2 (Java 8), which requires us...
Read more >
R2022-06 (cumulative patch) - 7.3 - Talend Help Center
Fixed issues in R2022-06 ... TDI-47810 - [7.3.1] Talend Studio : massive performance issues ... Microsoft SQL Server database metadata.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found