Skip to content

Commit

Permalink
Merge pull request cockroachdb#9178 from cockroachdb/foreign-key
Browse files Browse the repository at this point in the history
Add warning about IMPORT INTO statement
  • Loading branch information
gemma-shay authored Dec 15, 2020
2 parents 7d388fb + d3d3192 commit 42516b2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions v20.1/foreign-key.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ Because the foreign key constraint requires per-row checks on two tables, statem

You can improve the performance of some statements that use foreign keys by also using [`INTERLEAVE IN PARENT`](interleave-in-parent.html), but there are tradeoffs. For more information about the performance implications of interleaved tables (as well as the limitations), see the **Interleave tables** section of [Performance best practices](performance-best-practices-overview.html#interleave-tables).

{{site.data.alerts.callout_danger}}
Using [`IMPORT INTO`](import-into.html) will invalidate foreign keys without a [`VALIDATE CONSTRAINT`](validate-constraint.html) statement.
{{site.data.alerts.end}}

## Syntax

Foreign key constraints can be defined at the [table level](#table-level). However, if you only want the constraint to apply to a single column, it can be applied at the [column level](#column-level).
Expand Down
4 changes: 4 additions & 0 deletions v20.2/foreign-key.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ Because the foreign key constraint requires per-row checks on two tables, statem

You can improve the performance of some statements that use foreign keys by also using [`INTERLEAVE IN PARENT`](interleave-in-parent.html), but there are tradeoffs. For more information about the performance implications of interleaved tables (as well as the limitations), see the **Interleave tables** section of [Performance best practices](performance-best-practices-overview.html#interleave-tables).

{{site.data.alerts.callout_danger}}
Using [`IMPORT INTO`](import-into.html) will invalidate foreign keys without a [`VALIDATE CONSTRAINT`](validate-constraint.html) statement.
{{site.data.alerts.end}}

## Syntax

Foreign key constraints can be defined at the [table level](#table-level). However, if you only want the constraint to apply to a single column, it can be applied at the [column level](#column-level).
Expand Down
4 changes: 4 additions & 0 deletions v21.1/foreign-key.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ Because the foreign key constraint requires per-row checks on two tables, statem

You can improve the performance of some statements that use foreign keys by also using [`INTERLEAVE IN PARENT`](interleave-in-parent.html), but there are tradeoffs. For more information about the performance implications of interleaved tables (as well as the limitations), see the **Interleave tables** section of [Performance best practices](performance-best-practices-overview.html#interleave-tables).

{{site.data.alerts.callout_danger}}
Using [`IMPORT INTO`](import-into.html) will invalidate foreign keys without a [`VALIDATE CONSTRAINT`](validate-constraint.html) statement.
{{site.data.alerts.end}}

## Syntax

Foreign key constraints can be defined at the [table level](#table-level). However, if you only want the constraint to apply to a single column, it can be applied at the [column level](#column-level).
Expand Down

0 comments on commit 42516b2

Please sign in to comment.