[EMAIL PROTECTED] wrote:
We're then left with three choices: 1) setQueryTimeout() only affects Statement.execute() 2) setQueryTimeout() affects Statement.execute() and ResultSet.next(), starting from zero for each invocation 3) setQueryTimeout() affects Statement.execute() and ResultSet.next(), accumulating time spent in each invocation
I think option 3 is the most sensible one, but I'm open to other opinions. Also, it would be interesting to consider what other vendors do. Does anybody know?
I'd assumed from the wording of the setQueryTimeout that it was option 2 , more of response time issue than resource usage issue. But it would be good to see what the other driver vendors do.
I've spoken to several other people today who also think option 2 is a better choice, and I don't have any strong objections. It's also slightly easier to implement than option 3.
I'll write a test program that will time the execute and fetch operations on certain long-running queries, run with and without a specific query timeout set. Based on these timings, it should be possible to analyze the cancellation strategy (if any) used by a certain vendor.
But for the time being, I think we should go with option 2.
-- Oyvind Bakksjo [EMAIL PROTECTED] Office: +47 73842119 Mobile: +47 92283522
