Commit 00358f2
committed
perf: Fix O(n²) correlated subquery in analyse_external_idents
Replace unnecessary correlated subquery for JSONB merging with simple
concatenation. The subquery was executing for every row (1M+ times),
causing the import to hang for 9+ hours.
The 'intelligent merging' was unnecessary because base_error_jsonb and
unstable_identifier_errors_jsonb use different keys - they check mutually
exclusive error conditions for the same identifier column.1 parent b67cb0e commit 00358f2
File tree
1 file changed
+4
-21
lines changed- migrations
1 file changed
+4
-21
lines changedLines changed: 4 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
625 | 625 | | |
626 | 626 | | |
627 | 627 | | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
649 | 632 | | |
650 | 633 | | |
651 | 634 | | |
| |||
0 commit comments