misc/migration/3.17.11_Any.py
author Julien Cristau <julien.cristau@logilab.fr>
Wed, 13 Nov 2013 12:39:30 +0100
branchstable
changeset 9336 722635e530a0
child 9463 d62e13eba033
permissions -rw-r--r--
[server] Add missing indices for undo support (closes #3259691) The tables used by the 'undo' feature were missing some indices, which among other things triggered repeated sequential scans when deleting old transactions.

for table, column in [
        ('transactions', 'tx_time'),
        ('tx_entity_actions', 'tx_uuid'),
        ('tx_relation_actions', 'tx_uuid')]:
    session.cnxset.source('system').create_index(session, table, column)

commit()