Revision 3306
Added by Aaron Marcuse-Kubitza over 12 years ago
sql_io.py | ||
---|---|---|
459 | 459 |
elif has_joins: |
460 | 460 |
select_joins = input_joins+[sql_gen.Join(out_table, join_cols)] |
461 | 461 |
log_debug('Getting output table pkeys of existing/inserted rows') |
462 |
insert_into_pkeys(select_joins, pkeys_cols, distinct=True)
|
|
462 |
insert_into_pkeys(select_joins, pkeys_cols) |
|
463 | 463 |
else: |
464 | 464 |
sql.add_row_num(db, insert_out_pkeys) # for joining with input pkeys |
465 | 465 |
|
Also available in: Unified diff
sql_io.py: put_table(): Getting output table pkeys of existing/inserted rows: Don't DISTINCT ON the joined rows by input pkey, because this adds sorting overhead. This should not be needed because there generally should not be any duplicate rows for the columns in a unique index (if there are, this is an index configuration problem and should be fixed in the schema). It's possible that partial indexes (with a filter condition) were causing this, but testing without it in place will be needed to determine the cause.