As Java developers we regularly have problems with applications running slowly due to an inefficient database query. Often there is little logging to help track down which query is causing the problem. Log4jdbc can help out here. Log4jdbc is a Java library that can log your database queries and how long they take. It can also log warnings and errors when queries are too slow based on thresholds.