[YSQL] Trigger + FK Constraint discards Single Row Optimization during UPDATE TABLE #19042
Open
1 task done
Labels
area/ysql
Yugabyte SQL (YSQL)
kind/enhancement
This is an enhancement of an existing feature
priority/medium
Medium priority issue
Jira Link: DB-7859
Description
Consider a simple table with the following schema:
Insert a row into the table, and update the non-index column 'v'. Observe the query plan for the update command:
Create a parent table to be used for foreign key references:
Now, observe the query plan on issuing the same update statement: it should remain the same.
Next, remove the foreign key constrain and add a simple no-op trigger.
Now, observe the query plan on issuing the same update statement: it should remain the same.
Finally, add back the foreign key constraint:
The update statement now results in a different query plan that no longer performs the single RPC update:
Summary: Updates to a table having both a FK constraint and a trigger are performed over multiple RPCs when they should ideally be performed over a single RPC.
Warning: Please confirm that this issue does not contain any sensitive information
The text was updated successfully, but these errors were encountered: