cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From KathyS <>
Subject query_governor_cost_limit setting not working with cayenne?
Date Fri, 19 Dec 2008 23:08:21 GMT


I'm retrofitting an existing project to use Cayenne back end. We use SQL
Server, and we need to be able in certain cases to prevent long running
queries from starting. SQL Server does that by using
query_governor_cost_limit setting and comparing it with time estimation
prior to running the query. And it works with plain JDBC - executing in the
same connection "SET query_governor_cost_limit x" and the long running
select query results in the query being canceled. But it doesn't work with
Cayenne for some reason. I made a query chain, and added the governor as the
first query, then long running select. It all gets executed, which - in this
case - is a big problem! Log is shown below. I'd appreciate advice. Is
cayenne re-setting connection between queries in a chain? Is there any funky
stuff going with PreparedStatement? 

INFO  QueryLogger: SET query_governor_cost_limit 2
INFO  QueryLogger: SELECT ... 
INFO  QueryLogger: === returned 2700 rows. - took 15594 ms.

View this message in context:
Sent from the Cayenne - User mailing list archive at

View raw message