[
https://issues.apache.org/jira/browse/DERBY-4538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mamta A. Satoor updated DERBY-4538:
-----------------------------------
Attachment: DERBY4538_NoReferencingClause_stat_v2.txt
DERBY4538_NoReferencingClause_diff_v2.txt
Attaching patch DERBY4538_NoReferencingClause_diff_v2.txt which is ready for
commit. This changes the UPDATE and DELETE statement codes to be little bit
smarter when they decide what columns should be part of the read map.
Currently, as soon as these 2 nodes find that there are relevant triggers on
the table, we decide to read all the columns from the table. I am changing code
to check if all the relevant tiggers have missing REFERENCING clause. If yes,
then do not need to read all the columns. Just the columns needed by the
UPDATE/DELETE statement. This will get rid of OOM we run into when the table
has LOB columns BUT only in the case when the UPDATE/DELETE statement does not
reference the LOB column and all the triggers defined on them have missing
REFERENCING clause. I have enabled the TriggerTests in lowmem suite with the
missing REFERENCING clause cases enabled. For all the other test cases, I
simply return from those test cases without actually testing it because we do
not have fix for those cases yet. The lowmem suite does not get regularly and
when it is run, as the name indicates, it runs with limited heap. I wanted us
to be able to run these tests with default heap as well. To achieve that, I am
including the TriggerTests in lang suite too. Please let me know if there are
any questions. I will commit this patch sometime next week.
The INSERT table with INSERT triggers work fine already without my changes as
long as the INSERT statement does not reference the LOB column.
> If the CREATE TRIGGER does not have the REFERENCING clause, then there is no
> need to keep before and after values for the triggering table
> ------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-4538
> URL: https://issues.apache.org/jira/browse/DERBY-4538
> Project: Derby
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 10.6.0.0
> Reporter: Mamta A. Satoor
> Assignee: Mamta A. Satoor
> Priority: Minor
> Attachments: DERBY4538_NoReferencingClause_diff_v1.txt,
> DERBY4538_NoReferencingClause_diff_v2.txt,
> DERBY4538_NoReferencingClause_stat_v1.txt,
> DERBY4538_NoReferencingClause_stat_v2.txt
>
>
> In order for the trigger action to have access to before and after values of
> the triggering table, the CREATE TRIGGER should use the REFERENCING clause.
> Without the REFERENCING clause, old and new values of triggering table can't
> be accessed by the trigger action. Based on this, we can improve Derby memory
> utilization by not keeping old and new values if REFERENCING clause is
> missing. It will be good to see if the code already does this optimization
> and if not, then introducing this optimization will definitely be very useful
> when the triggering table could have LOB columns.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.