Revision 3068
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
1218 | 1218 |
if isinstance(col_indexes, list): col_indexes[0] = add_indexes_ # defer |
1219 | 1219 |
elif col_indexes: add_indexes_() # add now |
1220 | 1220 |
|
1221 |
def analyze(db, table): |
|
1222 |
table = sql_gen.as_Table(table) |
|
1223 |
run_query(db, 'ANALYZE '+table.to_str(db), log_level=3) |
|
1224 |
|
|
1221 | 1225 |
def vacuum(db, table): |
1222 | 1226 |
table = sql_gen.as_Table(table) |
1223 | 1227 |
db.with_autocommit(lambda: run_query(db, 'VACUUM ANALYZE '+table.to_str(db), |
Also available in: Unified diff
sql.py: Added analyze()