Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6909243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:39:54+00:00 2026-05-27T08:39:54+00:00

I have a Java application using Hibernate to communicate with a MsSQL 2005 server,

  • 0

I have a Java application using Hibernate to communicate with a MsSQL 2005 server, the driver is net.sourceforge.jtds 1.2.4.

Things are working but the performance is horrible, I suspect the index isn’t used for the queries passed to it, since the response times are proportional to the number of entries in the table.


I have written a small test application that use the same driver (jtds) but doesn’t use Hibernate and I have been able to reproduce the poor performance (or so I believe). When I use a prepared statements I see the same poor performance as using Hibernate (response times of ~1s), but when I don’t the performance is great (~10ms).

I am able to get the same good performance using the Hibernate executeSql method instead of the Criteria interface, but I want to avoid this since I want the code to stay modular and also the results are not converted to my entity class.

Is there some way to have the good performance with Hibernate, while still using a backend-agnostic way of making queries and having the results converted to entity class objects?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T08:39:54+00:00Added an answer on May 27, 2026 at 8:39 am

    Have you tried the proprietary driver from Microsoft? You can download it here. And an overview of the supported configurations is shown here. It might give you better performance.

    A related post on SO might also be of help to you: how to configure hibernate config file for sql server

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made an application using Java/Hibernate/MySQL, but whenever I try running it, it
I have a Java based web-application using Java Server Faces and Facelets. I am
I have a Java application that persists byte[] structures to a DB (using Hibernate).
I am developing an application using oracle 11g, Java(struts2) and Hibernate. I have table
I'm using Hibernate and PostgreSQL 8.4 database in a Java application. I have the
I have a problem with Hibernate (3.6.0.-Final) in my Java EE application using MySQL
I have java application with web interface (Spring MVC) using Hibernate. I have quite
i have a java web application, using Spring, Jersey (jax-rs) and Hibernate. It runs
I have a java-application using JDBC for database interaction. I want to do a
I have a Java Mobile application using CLDC 1.0 and MIDP 2.0 and I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.