Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You can attach the Profiler and monitor for the events <a href="http://msdn.microsoft.com/en-us/library/ms176010.aspx" rel="nofollow noreferrer">SQL:BatchCompleted</a> and <a href="http://msdn.microsoft.com/en-us/library/ms188675.aspx" rel="nofollow noreferrer">SP:Completed</a>, with a filter on duration > 1000. Run the procedure from your Java client and from SSMS. Compare the Reads and the Writes of the two events (Java vs. SSMS). Are they significantly different? This would indicate considerably different execution paths or plans, with significant difference in I/O.</p> <p>Also try to capture the <a href="http://msdn.microsoft.com/en-us/library/ms189318.aspx" rel="nofollow noreferrer">Showplan XML</a> event of the two and compare the plans (save the event as a .sqlplan file, open it in SSMS to easy analysis). Do they have similar plans? Are there wild differences in Estimate vs. Actual (rows, rewinds, rebinds)? Do they have same degree of parallelism? The plans can aso be retrieved from <a href="http://technet.microsoft.com/en-us/library/ms177648.aspx" rel="nofollow noreferrer">sys.dm_exec_requests</a> view.</p> <p>Are there any warning events raised, like <a href="http://msdn.microsoft.com/en-us/library/ms190395.aspx" rel="nofollow noreferrer">Missing Column Statistics</a>, <a href="http://msdn.microsoft.com/en-us/library/ms178041.aspx" rel="nofollow noreferrer">Sort Warnings</a>, <a href="http://msdn.microsoft.com/en-us/library/ms190736.aspx" rel="nofollow noreferrer">Hash Warning</a>, <a href="http://msdn.microsoft.com/en-us/library/ms178036.aspx" rel="nofollow noreferrer">Execution Warnings</a>, <a href="http://msdn.microsoft.com/en-us/library/ms191168.aspx" rel="nofollow noreferrer">Blocked Process</a>?</p> <p>the point is that you have at your disposal a whole arsenal of investigation tools. Once you find the root cause of the difference, you can trace it down to what is different between your Java environment settings and the SSMS environment (ADO.Net SqlClient). Things like default transaction isolation level, ANSI settings etc etc.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload