Class CQueryPlan

  • All Implemented Interfaces:
    SpiQueryPlan

    public class CQueryPlan
    extends Object
    implements SpiQueryPlan
    Represents a query for a given SQL statement.

    This can be executed multiple times with different bind parameters.

    That is, the sql including the where clause, order by clause etc must be exactly the same to share the same query plan with the only difference being bind values.

    This is useful in that is common in OLTP type applications that the same query will be executed quite a lot just with different bind values. With this query plan we can bypass some of the query statement generation (for performance) and collect statistics on the number and average execution times. This is turn can be used to identify queries that could be looked at for performance tuning.