Project

General

Profile

« Previous | Next » 

Revision 3064

sql.py: update() calls: Use in_place where possible to avoid creating dead rows, which bloats table size

View differences:

lib/sql.py
1101 1101
        log_level=3)
1102 1102
    new_col.name = new_typed_col.name # propagate any renaming
1103 1103
    
1104
    update(db, col.table, [(new_col, expr)], cacheable=True, log_level=3)
1104
    update(db, col.table, [(new_col, expr)], in_place=True, cacheable=True,
1105
        log_level=3)
1105 1106
    if not nullable: add_not_null(db, new_col)
1106 1107
    add_index(db, new_col)
1107 1108
    
......
1185 1186
    add_col(db, table, new_typed_col, comment='src: '+repr(col))
1186 1187
    new_col.name = new_typed_col.name # propagate any renaming
1187 1188
    
1188
    update(db, table, [(new_col, expr)], cacheable=True)
1189
    update(db, table, [(new_col, expr)], in_place=True, cacheable=True)
1189 1190
    add_index(db, new_col)
1190 1191
    
1191 1192
    return new_col

Also available in: Unified diff