db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta A. Satoor (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4136) Allow optimizer overrides for UPDATE and DELETE
Date Wed, 16 Jun 2010 18:54:30 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12879455#action_12879455

Mamta A. Satoor commented on DERBY-4136:

Dag, i do not recall any specific reason why DELETE and UPDATE were exempted. 

I think it will be good to enable the support for UPDATE and DELETE as long as we do it in
a similar format as for SELECT which is through the comments. We decided to support it for
SELECT through comments so that we do not violate any SQL standards thus keeping our SQL syntax
compatible with other database products.

> Allow optimizer overrides for UPDATE and DELETE
> -----------------------------------------------
>                 Key: DERBY-4136
>                 URL: https://issues.apache.org/jira/browse/DERBY-4136
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions:
>            Reporter: Ronald Tschalaer
>            Priority: Minor
> Since UPDATE and DELETE statements effectively run a query behind the scenes to find
the rows to update or delete, it would be useful to be able specify optimizer overrides (--
DERBY-PROPERTIES) for these statements too. As a specific use case, I have an issue with locking
where I need to ensure the indexes are always used in order to prevent deadlocks. The current
workaround is to run a SELECT (where I can supply the appropriate --DERBY-PROPERTIES index=...)
with an updatable ResultSet and do the updates/deletes on the ResultSet. While this works,
it is uglier and less clear than the corresponding UPDATE/DELETE statements.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message