You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Oyvind Bakksjo (JIRA)" <de...@db.apache.org> on 2005/08/12 17:22:00 UTC

[jira] Created: (DERBY-505) Add system procedure to allow setting statement timeout

Add system procedure to allow setting statement timeout
-------------------------------------------------------

         Key: DERBY-505
         URL: http://issues.apache.org/jira/browse/DERBY-505
     Project: Derby
        Type: New Feature
  Components: SQL  
    Versions: 10.1.1.0    
    Reporter: Oyvind Bakksjo
 Assigned to: Oyvind Bakksjo 
    Priority: Minor


Propose to add a system procedure:

  SYSCS_UTIL.SYSCS_SET_STATEMENT_TIMEOUT(INT)

This procedure will enable the query timeout functionality not only through JDBC, but also through SQL. I suggest the following semantics:

The timeout value (in seconds) set with this procedure will apply to all subsequent statements executed on the current connection (the same connection on which the procedure was called), until a different value is set with the same procedure. A value of 0 indicates no timeout. Supplying a negative value will cause an exception. For each executed statement, the semantics are the same as for using Statement.setQueryTimeout() through JDBC.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Created: (DERBY-505) Add system procedure to allow setting statement timeout

Posted by Oy...@Sun.COM.
Satheesh Bandaram wrote:
> I agree with these comments... In fact, I added similar comments to the 
> bug on 14th Aug. In case Jira didn't send that message out, here it is:
> 
>     I would like to hear reasoning behind this new feature request. I
>     see following issues with the suggestion:
> 
>     1) System procedures and functions are used for admin and diagnostic
>     purposes typically. Since there is no standard for these, every
>     database vendor has their own way to perform admin and diagnostics.
>     However, this proposal seems to define application behavior based on
>     system procedure.
> 
>     2) I would like to know why JDBC's setQueryTimeout mechanism is not
>     sufficient... Not sure what the bug comment means by "query timeout
>     functionality not only through JDBC, but also through SQL". Derby
>     supports SQL only using JDBC currently. If the comment is refering
>     to IJ, that is also a JDBC application and could be programmed to
>     support query timeout using JDBC.
> 
> Satheesh
> 
> Mike Matrigali wrote:
> 
>>I am wondering why this is necessary, since there is a way to do
>>this through jdbc - why add a different way to do this?  I assume
>>users could always create their own procedure if they needed it.
>>What is the circumstance that you need this from SQL rather
>>than JDBC.
>>
>>To me this just doesn't seem like the right use of the derby
>>provided system procedures.
>>
>>We added the system utility system procedures as a last resort
>>for the things which had no sql standard, like backup and import.  Any
>>use of system procedure is non-standard and will cause issues for
>>database portability, so I think it is important to not add to them
>>if it is not necessary.
>>
>>If there really is a need to do this from sql rather than jdbc
>>I would prefer in the following order:
>>1) let users create their own procedure using existing available syntax
>>2) do the setting as a property rather than a system procedure

Hi,

Sorry for not getting back to you on this, I've been busy with other 
stuff the past couple of days.

So, a little bit of history. In a previous email 
(http://mail-archives.apache.org/mod_mbox/db-derby-dev/200507.mbox/%3c42C58BCF.3060302@Sourcery.Org%3e), 
I suggested (on the side of the main topic) making query timeout 
available to SQL scripting through the use of a SET statement. (Making 
e.g. ij use the JDBC methods, such as Statement.setQueryTimeout(), would 
require it to parse the input.) In a following email 
(http://mail-archives.apache.org/mod_mbox/db-derby-dev/200507.mbox/%3c42E78BDA.2020803@debrunners.com%3e), 
Dan asked whether it could be done in a system procedure, rather than by 
adding new grammar. So I just wanted to propose it, since it would be 
really easy to implement if there is any interest in the functionality.

It seems there isn't. ;o) I'll close the issue.

-- 
Øyvind Bakksjø
Sun Microsystems, Database Technology Group
Haakon VII gt. 7b, N-7485 Trondheim, Norway
Tel: x43419 / +47 73842119, Fax: +47 73842101

Re: [jira] Created: (DERBY-505) Add system procedure to allow setting statement timeout

Posted by Mike Matrigali <mi...@sbcglobal.net>.
I am wondering why this is necessary, since there is a way to do
this through jdbc - why add a different way to do this?  I assume
users could always create their own procedure if they needed it.
What is the circumstance that you need this from SQL rather
than JDBC.

To me this just doesn't seem like the right use of the derby
provided system procedures.

We added the system utility system procedures as a last resort
for the things which had no sql standard, like backup and import.  Any
use of system procedure is non-standard and will cause issues for
database portability, so I think it is important to not add to them
if it is not necessary.

If there really is a need to do this from sql rather than jdbc
I would prefer in the following order:
1) let users create their own procedure using existing available syntax
2) do the setting as a property rather than a system procedure


Oyvind Bakksjo (JIRA) wrote:

> Add system procedure to allow setting statement timeout
> -------------------------------------------------------
> 
>          Key: DERBY-505
>          URL: http://issues.apache.org/jira/browse/DERBY-505
>      Project: Derby
>         Type: New Feature
>   Components: SQL  
>     Versions: 10.1.1.0    
>     Reporter: Oyvind Bakksjo
>  Assigned to: Oyvind Bakksjo 
>     Priority: Minor
> 
> 
> Propose to add a system procedure:
> 
>   SYSCS_UTIL.SYSCS_SET_STATEMENT_TIMEOUT(INT)
> 
> This procedure will enable the query timeout functionality not only through JDBC, but also through SQL. I suggest the following semantics:
> 
> The timeout value (in seconds) set with this procedure will apply to all subsequent statements executed on the current connection (the same connection on which the procedure was called), until a different value is set with the same procedure. A value of 0 indicates no timeout. Supplying a negative value will cause an exception. For each executed statement, the semantics are the same as for using Statement.setQueryTimeout() through JDBC.
> 

[jira] Commented: (DERBY-505) Add system procedure to allow setting statement timeout

Posted by "Satheesh Bandaram (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-505?page=comments#action_12318727 ] 

Satheesh Bandaram commented on DERBY-505:
-----------------------------------------

I would like to hear reasoning behind this new feature request. I see following issues with the suggestion:

1) System procedures and functions are used for admin and diagnostic purposes typically. Since there is no standard for these, every database vendor has their own way to perform admin and diagnostics. However, this proposal seems to define application behavior based on system procedure.

2) I would like to know why JDBC's setQueryTimeout mechanism is not sufficient... Not sure what the bug comment means by "query timeout functionality not only through JDBC, but also through SQL". Derby supports SQL only using JDBC currently. If the comment is refering to IJ, that is also a JDBC application and could be programmed to support query timeout using JDBC.



> Add system procedure to allow setting statement timeout
> -------------------------------------------------------
>
>          Key: DERBY-505
>          URL: http://issues.apache.org/jira/browse/DERBY-505
>      Project: Derby
>         Type: New Feature
>   Components: SQL
>     Versions: 10.1.1.0
>     Reporter: Oyvind Bakksjo
>     Assignee: Oyvind Bakksjo
>     Priority: Minor

>
> Propose to add a system procedure:
>   SYSCS_UTIL.SYSCS_SET_STATEMENT_TIMEOUT(INT)
> This procedure will enable the query timeout functionality not only through JDBC, but also through SQL. I suggest the following semantics:
> The timeout value (in seconds) set with this procedure will apply to all subsequent statements executed on the current connection (the same connection on which the procedure was called), until a different value is set with the same procedure. A value of 0 indicates no timeout. Supplying a negative value will cause an exception. For each executed statement, the semantics are the same as for using Statement.setQueryTimeout() through JDBC.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (DERBY-505) Add system procedure to allow setting statement timeout

Posted by "Oyvind Bakksjo (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-505?page=all ]
     
Oyvind Bakksjo closed DERBY-505:
--------------------------------

    Resolution: Won't Fix

No interest in this functionality. Use JDBC instead.

> Add system procedure to allow setting statement timeout
> -------------------------------------------------------
>
>          Key: DERBY-505
>          URL: http://issues.apache.org/jira/browse/DERBY-505
>      Project: Derby
>         Type: New Feature
>   Components: SQL
>     Versions: 10.1.1.0
>     Reporter: Oyvind Bakksjo
>     Assignee: Oyvind Bakksjo
>     Priority: Minor

>
> Propose to add a system procedure:
>   SYSCS_UTIL.SYSCS_SET_STATEMENT_TIMEOUT(INT)
> This procedure will enable the query timeout functionality not only through JDBC, but also through SQL. I suggest the following semantics:
> The timeout value (in seconds) set with this procedure will apply to all subsequent statements executed on the current connection (the same connection on which the procedure was called), until a different value is set with the same procedure. A value of 0 indicates no timeout. Supplying a negative value will cause an exception. For each executed statement, the semantics are the same as for using Statement.setQueryTimeout() through JDBC.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira