Revision 3146
Added by Aaron Marcuse-Kubitza over 12 years ago
bin/csv2db | ||
---|---|---|
126 | 126 |
log('Cleaning up table') |
127 | 127 |
sql_io.cleanup_table(db, table, col_names) |
128 | 128 |
|
129 |
log('Adding indexes') |
|
130 |
for col in typed_cols[1:]: # exclude pkey |
|
131 |
log('Adding index on '+col.name) |
|
132 |
sql.add_index(db, col.name, table, ensure_not_null_=False) |
|
133 |
|
|
134 | 129 |
log('Reanalyzing table') |
135 | 130 |
sql.analyze(db, table) |
136 | 131 |
|
Also available in: Unified diff
csv2db: Don't add indexes on the created table because they use up more disk space than the table itself and currently aren't used. (The import process adds indexes on each iteration's column subset instead.)