İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
1324 Görünümler

I am having a database with lots of account move lines ,  while loading the trial balance on screen report without applying ir rules , it gets load within 30 seconds or so , but if i apply record rules it takes a lots of time like 6 - 7 minutes , i think the query execution takes a lots of time !!

I have also generated odoo profile but it gives like majority parts goes to get_html method , but while debugging , majority time goes on get_lines method and the html is loaded within seconds  after that .

Any idea how to optimise this or track where is the exact point of failure or issue , i even done indexing on the fields included in record rules .. but no difference , also no compute field in that.

Thanks

Avatar
Vazgeç

could you share the domain applied for the rule

Üretici

Niyas,
actually there are multiple record rules in there, in between 10 to 15

Üretici

All for different use case , but when we go to trial balance they all get applies and makes the query so heavy !! Same conditions also applies on the general ledger but it gets printed in no time , and also i see some repeated union all statements also in the trial balance query , do you think maybe that can be a reason ??

How can i trace it like what is not working here , because the profilers are saying its the html , but i am debugging code and it takes maximum time for cr.execute !! So i am stuck here.

Üretici En İyi Yanıt

Also the query has multiple union all with same conditions !! and all with applied record rule conditions.

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
0
Tem 25
641
2
Şub 23
2024
1
Haz 18
6071
2
Haz 16
5906
0
Haz 15
3985