Module io.ebean.api
Package io.ebean.meta

Class QueryPlanRequest

java.lang.Object
io.ebean.meta.QueryPlanRequest

public class QueryPlanRequest extends Object
Request used to capture query plans.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Return the maximum number of plans to capture.
    void
    maxCount(int maxCount)
    Set the maximum number of plans to capture.
    long
    Return the maximum amount of time we want to use to capture plans.
    void
    maxTimeMillis(long maxTimeMillis)
    Set the maximum amount of time we want to use to capture plans.
    long
    Return the epoch time in millis for minimum bind capture time.
    void
    since(long since)
    Set the epoch time (e.g.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • QueryPlanRequest

      public QueryPlanRequest()
  • Method Details

    • since

      public long since()
      Return the epoch time in millis for minimum bind capture time.

      When set this ensures that the bind values used to get the query plan have been around for a while (e.g. 5 mins) and so reasonably represent bind values that match the slowest execution for this query plan.

    • since

      public void since(long since)
      Set the epoch time (e.g. 5 mins ago) such that the query bind values reasonably represent bind values that match the slowest execution for this query plan.
      Parameters:
      since - The minimum age of the bind values capture.
    • maxCount

      public int maxCount()
      Return the maximum number of plans to capture.
    • maxCount

      public void maxCount(int maxCount)
      Set the maximum number of plans to capture.

      Use this to limit how much query plan capturing is done as query plan capture is actual database load.

    • maxTimeMillis

      public long maxTimeMillis()
      Return the maximum amount of time we want to use to capture plans.

      Query plan collection will stop once this time is exceeded.

    • maxTimeMillis

      public void maxTimeMillis(long maxTimeMillis)
      Set the maximum amount of time we want to use to capture plans.

      Query plan collection will stop once this time is exceeded. We use this to ensure the query plan capture does not use excessive amount of time - put too much load on the database.