There is also a missing index on the account code (that would used on every account search).
---------
Just as an example of performance improvements that can be achieved with proper indexes, every time we do an "--update=all" (on one of our development databases) this kind of query is executed about 400 times:
(1) SELECT ir_model_data.id FROM "ir_model_data" WHERE (ir_model_data.module IN (E'')) AND (ir_model_data.model IN (E'',E'',E'')) ORDER BY id;
This other kind of query is performed almost 900 times:
(2) SELECT * FROM ir_model_fields WHERE model=E'' AND state=E'';
It spends about 2 seconds doing the first query and about one second doing the last one.
Adding the next indexes the times go down to 0.2 seconds and 0.3 seconds. That means that on 3 seconds we save 2.5 seconds!:
CREATE INDEX ir_model_data__module_model_id__index
ON ir_model_data (module, model, id);
CREATE INDEX ir_model_fields__model_state__index
ON ir_model_fields (model, state);
+1 Ferdinand
There is also a missing index on the account code (that would used on every account search).
---------
Just as an example of performance improvements that can be achieved with proper indexes, every time we do an "--update=all" (on one of our development databases) this kind of query is executed about 400 times:
(1) SELECT ir_model_data.id FROM "ir_model_data" WHERE (ir_model_ data.module IN (E'')) AND (ir_model_ data.model IN (E'',E'',E'')) ORDER BY id;
This other kind of query is performed almost 900 times:
(2) SELECT * FROM ir_model_fields WHERE model=E'' AND state=E'';
It spends about 2 seconds doing the first query and about one second doing the last one.
Adding the next indexes the times go down to 0.2 seconds and 0.3 seconds. That means that on 3 seconds we save 2.5 seconds!:
CREATE INDEX ir_model_ data__module_ model_id_ _index fields_ _model_ state__ index
ON ir_model_data (module, model, id);
CREATE INDEX ir_model_
ON ir_model_fields (model, state);