0

We're having some SQL bottlenecks, I guess it's due to transaction isolation.

We're gonna try debugging step-by-step our offending code and checking the database profiler to detect which resources are being blocked at a given time.

How would you diagnostic SQL bottlenecks on Java EE?

vaultah
  • 44,105
  • 12
  • 114
  • 143
SDReyes
  • 9,798
  • 16
  • 53
  • 92
  • 1
    If you mention which DBMS you're using, you may get some specific suggestions on database-level tooling that can expose possible concurrency issues. – Fred Sobotka Sep 06 '12 at 22:49

1 Answers1

0

I'd use a quite classical method: measure the time used by each query and write in a debug file the timings, followed by the query. Then, run the application a few times, in normal usage conditions, and see the queries that take more time.

About timing in Java: How do I time a method's execution in Java?

Also notice that some SQL queries do take more time than others because of the quantity of data: for example, "SELECT" statements are common bottlenecks. A SELECT * FROM userdata statement takes much more time than a SELECT name, surname FROM userdata one, especially when you have lots of stored data.

Community
  • 1
  • 1
Giulio Muscarello
  • 1,312
  • 2
  • 12
  • 33