Message 27428

Message id


Indexes on table have a cost on update. On postgresql, all indexes must be updated when a row is updated even if the update does not change the indexed columns (see [1]). I think we have made the creation of index (with select=True) to easy and so we probably have too much indexes.
My proposal is to remove the attribute 'select' on the fields and to force developer to write code in __setup__ using the TableHandler.
This change will force us to review all the current index (and probably remove many) but also it will make us think if we do not need a more complex indexes (instead of simple column).

Later we could improve the TableHandler.index_action to allow to specify which kind of indexes (btree, trigram etc.) depending on the backend.

For the decision about keeping an index, it will be good to have statistics of production databases. Such statistics can be retrieved from PostgreSQL using this query:

    SELECT * FROM pg_stat_all_indexes;

Date User Action Args
2016-07-27 19:58:53cedsetmessageid: <>
2016-07-27 19:58:53cedlinkissue5757 messages
2016-07-27 19:58:51cedcreate

Showing 10 items. Show all history (warning: this could be VERY long)