On 21-8-2016 09:39, Mark Rotteveel wrote:
> On 18-8-2016 00:19, Vlad Khorsun wrote:
>>> Considering API calls, network times, etc, I doubt < 1s would be good
>>> for anything here.
>>
>>    What about 2500 ms ? :)
>>
>>    I don't insist on milliseconds for statement timeouts. I want to hear more
>> opinions. Btw, PG uses milliseconds :)
>
> I'd prefer milliseconds, because that is the right granularity, and the
> JDBC API also uses timeouts in milliseconds.

Actually, I'm wrong, for query timeout JDBC expects seconds...

In any case, it says:

"""
Sets the number of seconds the driver will wait for a Statement object 
to execute to the given number of seconds. By default there is no limit 
on the amount of time allowed for a running statement to complete. If 
the limit is exceeded, an SQLTimeoutException is thrown. A JDBC driver 
must apply this limit to the execute, executeQuery and executeUpdate 
methods.

Note: JDBC driver implementations may also apply this limit to ResultSet 
methods (consult your driver vendor documentation for details).

Note: In the case of Statement batching, it is implementation defined as 
to whether the time-out is applied to individual SQL commands added via 
the addBatch method or to the entire batch of SQL commands invoked by 
the executeBatch method (consult your driver vendor documentation for 
details).
"""

I think a single timeout that is measured over the entire execute + all 
fetches is too brittle. I'd prefer if the timeout is applied to the 
execute and each individual fetch.

Mark
-- 
Mark Rotteveel

------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to