Manifest Academy

Home › Curriculum › Odoo Developer › Performance: N+1, prefetching, aggregates, indexes and profiling

Testing, quality and performance · 16 min · 17–20

Performance: N+1, prefetching, aggregates, indexes and profiling

Writing fast ORM code, finding slow requests and queries, indexing and profiling.

In this lesson

Key points

Real-world example

A customer statement report took 90 seconds: it searched invoices once per customer inside a loop over 4,000 customers. One search for all open invoices, grouped in a dictionary by partner, brought it to 3 seconds.

Questions and answers

How do you see SQL in logs?

--log-level=debug_sql (development only).

What does odoo-bin populate do?

Generates realistic volumes of test data for performance testing.

Read the full lesson, worked example and quiz