I am working with a java based web application and we use Microsoft SQL Server as the database server. In there we have couple of long running SQL queries and we are looking for options to improve the performance of those queries.
When I start reading about the query performance improvements, I found that SQL Server caches the query execution plans and the next time it can reuse it from the cache without creating a new execution plan. I tried it on MSSQL management studio console with SET STATISTICS TIME ON;
and it clearly shows that SQL Server caches the execution plans. Does it automatically happens with JDBC? Or do we need to follow any specific instructions? I tried googling with out luck.