Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSSQL db JDBC performance properties

I was trying to improve the performance of our jdbc connection to our Microsoft sql server database. I switched from the jTDS jdbc driver to the official Microsoft JDBC driver on maven:

For MySQL, there exist configuration properties such as cachePrepStmts, prepStmtCacheSize, prepStmtCacheSqlLimit etc., but I could not find out if they also exist for Microsoft SQL server.

I would like to enable batch writing, statement caching and look for other options that could improve the performance of our application´s db calls.

Any ideas?

Edit: I finally solved the problem by building custom batch SQL queries of the style ´delete o from OBJECT where o.id is one of this set of ids´. This did the trick for deletion at least, which is the one thing we had to optimize right now.

like image 899
Ben Avatar asked Sep 07 '25 12:09

Ben


1 Answers

Probably the best source for that sort of information would be the MSDN article

Improving Performance and Reliability with the JDBC Driver

which includes such topics as

  • Closing Objects when Not In Use
  • Managing Transaction Size
  • Working with Statements and Result Sets
  • Using Adaptive Buffering
  • Sparse Columns
like image 114
Gord Thompson Avatar answered Sep 10 '25 21:09

Gord Thompson