Module io.ebean.api

Class SlowQueryEvent


  • public class SlowQueryEvent
    extends Object
    Slow query event.
    • Constructor Detail

      • SlowQueryEvent

        public SlowQueryEvent​(String sql,
                              long timeMillis,
                              int rowCount,
                              ObjectGraphNode originNode)
        Construct with the SQL and execution time in millis.
    • Method Detail

      • getSql

        public String getSql()
        Return the SQL for the slow query.
      • getTimeMillis

        public long getTimeMillis()
        Return the execution time in millis.
      • getRowCount

        public int getRowCount()
        Return the total row count associated with the query.
      • getOriginNode

        public ObjectGraphNode getOriginNode()
        Return the origin point for the root query.

        Typically the originNode.getOriginQueryPoint().getFirstStackElement() provides the stack line that shows the code that invoked the query.