Re: query_governor_cost_limit setting not working with cayenne?

From: KathyS (scarletkath..ahoo.com)
Date: Sat Dec 20 2008 - 09:48:56 EST

  • Next message: Andrus Adamchik: "Re: query_governor_cost_limit setting not working with cayenne?"

    I'm using Cayenne 2.

    JDBC code is straightforward:
    Statement stmnt = con.createStatement();
    stmnt.execute("SET query_governor_cost_limit 2");
    // now close this statement, prepare statement for long running query, run,
    and it gets canceled by server

    Cayenne code I used:
    QueryChain chain = new QueryChain();
    SQLTemplate cost = new SQLTemplate(x.class, "SET query_governor_cost_limit
    2");
    chain.addQuery(cost);
    SelectQuery query = new SelectQuery(x.class, expression);
    query.addPrefetch("xArray").setSemantics(PrefetchTreeNode.JOINT_PREFETCH_SEMANTICS);
    chain.addQuery(query);
    List<x> hdrs = context.performQuery(chain);

    It'd be great if you could help, Andrus, as this will be a showstopper for
    us if no workaround. FYI I did my test with 1 connection specifiied as max
    for the pool, plus using query chain I'm reasonably sure that both commands
    ran on the same connection.

    -- 
    View this message in context: http://www.nabble.com/query_governor_cost_limit-setting-not-working-with-cayenne--tp21099002p21105642.html
    Sent from the Cayenne - User mailing list archive at Nabble.com.
    



    This archive was generated by hypermail 2.0.0 : Sat Dec 20 2008 - 09:49:31 EST