Thanks Deepak, Since we have sometimes this question I have added a FAQ entry https://cwiki.apache.org/confluence/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-SQLQueriesDurations
Jacques Le 10/02/2016 11:01, Deepak Dixit a écrit :
Please refer GenericDAO.java file. In Ofbiz if query took more then 150 MS then its logged on console. {code} if (Debug.timingOn()) { long queryEndTime = System.currentTimeMillis(); long queryTotalTime = queryEndTime - queryStartTime; if (queryTotalTime > 150) { Debug.logTiming("Ran query in " + queryTotalTime + " milli-seconds: " + " EntityName: " + modelEntity.getEntityName() + " Sql: " + sql + " where clause:" + whereEntityConditionParams, module); } } {code} Thanks & Regards -- Deepak Dixit www.hotwaxsystems.com On Wed, Feb 10, 2016 at 1:45 PM, kulwantbughipura < [email protected]> wrote:Hello, Actually i want to dump all the sql queries which are executed by ofbiz when they take more time than the time specified by user. -- View this message in context: http://ofbiz.135035.n4.nabble.com/How-to-log-mysql-queries-which-takes-more-time-than-minimum-time-set-by-user-tp4677041.html Sent from the OFBiz - Dev mailing list archive at Nabble.com.
