OFBiz: Set SQL statement output on the console
To study the association between entity and view-entity in OFBiz, we also want to see how to output SQL statements. By default, the output SQL statements are subject to time restrictions. How can we cancel this operation?
1. Make sure print. Timing = true in debug. properties.
2. Open genericdao. Java, which contains approximately 798 rows (even 12.04 rows)
If (Debug. timingon ()){
Long queryendtime = system. currenttimemillis ();
Long querytotaltime = queryendtime-querystarttime;
When (querytotaltime> 150 ){
Debug. logtiming ("ran query in" + querytotaltime + "milli-seconds:" + SQL, module );
}
}
Annotate it, as shown in
// If (querytotaltime> 150 ){
Debug. logtiming ("ran query in" + querytotaltime + "milli-seconds:" + SQL, module );
//}
3. recompile and run-install
You can enter SQL statements in the console.
If any of the above is incorrect, please add