Community: Framework mailing list archives

Re: Deploying Odoo on 2 servers

Wolfgang Pichler
- 11/03/2014 04:02:23

this does highly depend on your Odoo use case. In my case i had a very large customer base (over 2 millions res_partner entries). So i had to add Trigram Indexes on the name field in res_partner.

But i also have changed the partners a little bit, they now have first name and last name - name gets computed. Also have divided street into streetname and house number.

So Indexes are really very depended on use case. Best thing is to let postgresql log all queries which takes longer than xx seconds - then inspect the log file - and try to optimize the database.

Have the indexes created in the standard will be not that easy, Trigram indexes are an extension to postgres as far as i know..


Am 03.11.2014 um 09:42 schrieb Lionel Sausin <>:

Le 03/11/2014 09:12, Wolfgang Pichler a écrit :
> Hi all,
> from my experience with a  larger installation, i can propose that you 
> should tune your postgresql database schema a little bit. Odoo does 
> not seem to make always proper use of indexes. So adding some extra 
> indexes on the database does help a lot. Especially Odoo does a lot of 
> LIKE %VALUE% Searches. This type of search does make normal BTREE 
> based indexes helpless, you have to activate Trigram Indexes for this 
> type of searches.
> Just adding more processing power will also help, but it does often 
> not help as much as searching for the real bottleneck you have…
> br,
> Wolfgang
Would you care to name some of the fields which benefit most from this 
kind of index ?
Probably we could make a PR to have them created in the standard.
Lionel Sausin.

Post to: