Community mailing list archives

Re: Slowness, customers

Gustavo Orrillo
- 2015年05月12日 08时26分10秒

Couple of places you might take a look at, the database and the code. Chances are the problem is in the database, a query might be taking too long to finish. One way you can detect such query is with the pg_stat_statements extension:

If you have configured things properly, finding the most time-consuming queries should be pretty easy:

select * from pg_statements order by total_time desc;

You might also take a look at this excellent post;

even though it is not performance related, gives you a couple of ideas of things to do.

Hope this helps,


On Tue, May 12, 2015 at 5:56 AM, Holger Brunn <> wrote:
Hash: SHA256

> We have in our database now 8500 invoices. The problem we are
> seeing is slowness in the usage of the system. For example when you
> open some of the larger customers (our largest one has 659
> invoices) it takes several minutes to open.

I made a patch to address this exact issue:

> Also opening the customer invoices list (for all invoices) is
> getting rather slow. We only have two users so it should not be
> related to concurrency issues.

If you remove the 80 records limit, things get slow fast. If you
actually use this, remove expensive computed fields. But better think
of cases where you use the full list and write a filter that gets you
what you need to know without fetching the whole list

> Are there any known issues here that we should be aware of? Any
> general tricks to analyze performance of Odoo? Cool database
> queries I don't know about?

I wrote a small script to check for bottlenecks on view load, you'll
find it attached. It's quick and dirty, but helps when trying to find
out why loading a specific view takes long

Generally, read

- -- 
Therp - Maatwerk in open ontwikkeling

Holger Brunn - Ontwerp en implementatie

phone: +31 (0)20 3093096
Version: GnuPG v2


Post to: