Revision 2959
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
1426 | 1426 |
pkey_joins = [insert_in_pkeys, sql_gen.Join(insert_out_pkeys, |
1427 | 1427 |
{row_num_col: sql_gen.join_same_not_null})] |
1428 | 1428 |
insert_into_pkeys(pkey_joins, pkeys_names) |
1429 |
|
|
1430 |
if not db.debug_temp: |
|
1431 |
log_debug('Emptying unneeded temp tables to free up memory') |
|
1432 |
truncate(db, insert_out_pkeys) |
|
1433 |
truncate(db, insert_in_pkeys) |
|
1429 | 1434 |
|
1430 | 1435 |
db.log_debug('Adding pkey on pkeys table to enable fast joins', level=2.5) |
1431 | 1436 |
add_pkey(db, into) |
... | ... | |
1439 | 1444 |
|
1440 | 1445 |
assert table_row_count(db, into) == table_row_count(db, in_table) |
1441 | 1446 |
|
1447 |
if not db.debug_temp: |
|
1448 |
log_debug('Emptying unneeded temp tables to free up memory') |
|
1449 |
truncate(db, in_table) |
|
1450 |
|
|
1442 | 1451 |
srcs = [] |
1443 | 1452 |
if is_func: srcs = sql_gen.cols_srcs(in_cols) |
1444 | 1453 |
return sql_gen.Col(out_pkey, into, srcs) |
Also available in: Unified diff
sql.py: put_table(): Empty unneeded temp tables to free up memory and avoid running out of memory (the temp tables seem to be in-memory only)