RE: a very long query

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Apr 20 2005 - 10:13:00 EDT

  • Next message: Sami Mohammed: "Primary key and sequence"

    Transaction log here is really an internal Cayenne "transaction" that
    doesn't use up any database resources and locks no rows. There is nothing
    unusual about the code or the logs.

    So I can only second Tore's suggestion - do some profiling. Or write a
    simple JDBC program executing the same query and see if there is any
    difference.

    Andrus

    >
    > Also, unless you really need this to be in a transaction, I would make
    > this a read-only call. (Thinking about it, your transactional context
    > could be the reason this runs so slowly in Cayenne but not when you
    > issue a manual query. You may be locking thousands of rows in Cayenne
    > that is not occurring when you run the command manually. Try starting a
    > transaction in the manual mode and see if things slow way down -- I bet
    > they do!)
    >
    > Best,
    >
    > Joe
    >
    >
    > -----Original Message-----
    > INFO QueryLogger: SELECT t0.attrib1 FROM public.my_view_7 t0
    > INFO QueryLogger: === returned 1 row. - *took 125687 ms*.
    > INFO QueryLogger: +++ transaction committed.



    This archive was generated by hypermail 2.0.0 : Wed Apr 20 2005 - 10:13:05 EDT