Your returns are all from views and are not direct table queries (which
would probably be better). Your view could be doing a lot of querying
under the covers even though only one row is selected. Why it
(apparently) runs faster in a SQL query environment is still a mystery
(if that is really the case) but I would look at the tools for
optimizing the query in your database and/or eliminating the view and
using a query or more direct approach that does not hide everything that
is going on.
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 - 09:16:52 EDT