Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ

I'm experiencing performance issues in Odoo related to the res_users table containing over 120,000 portal user records.


These issues manifest as:


Viewing the list view without the internal user filter (displaying all users) taking hours.

Creating a new users shows loading continuously and not saving.

Editing the login field of an existing user record. (Editing other fields works fine)

Deleting a single row from database on res_users takes  minutes. Deleting a large number of rows is impractical due to this time constraint.


Attempted Solutions:


Indexed partner_id and company_id fields in res_users.

Uninstalled all the custom modules and still the  same.

updated odoo13 base addons to latest.

Confirmed a simple SELECT query on res_users from the database works fine.but the list view which executes the below query is loading Infinite




query that executes on loading the list view on res_users table.


SELECT "res_users".id FROM "res_users","res_partner" as "res_users__partner_id" WHERE ("res_users"."active" = true) AND (("res_users"."share" IS NULL or "res_users"."share" = false ) OR ("res_users"."id" in (SELECT "user_id" FROM "res_company_users_rel" WHERE "cid" IN (1, 2, 3, 4)))) AND ("res_users"."partner_id" = "res_users__partner_id"."id") AND (((("res_users__partner_id"."partner_share" IS NULL or "res_users__partner_id"."partner_share" = false ) OR ("res_users__partner_id"."company_id" in (1,2,3,4))) OR "res_users__partner_id"."company_id" IS NULL ) AND (((("res_users__partner_id"."type" != 'private') OR "res_users__partner_id"."type" IS NULL) OR "res_users__partner_id"."type" IS NULL ) OR ("res_users__partner_id"."type" = 'private'))) ORDER BY "res_users__partner_id"."name" ,"res_users"."login"  limit 10



note- Analyzed the table with EXPLAIN ANALYZE but found no unusual constraints affecting deletes.

Also the delete query is working fine from database when disabling the triggers but no use on reading the data on loading list view which takes huge time.

Also everything is working fine when the table have less that 20000 rows.



How can I improve the performance of Odoo list views, user creation/editing, and record deletion when dealing with a large res_users table?


Additional Information:


Odoo version: 13

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ม.ค. 20
3042
0
พ.ค. 22
1404
1
ส.ค. 20
4763
Postgresql version for Odoo 13 แก้ไขแล้ว
2
ส.ค. 20
16615
2
ธ.ค. 19
3956