Closed PetrDlouhy closed 2 weeks ago
I'm considering create another view for this, much like in #120.
I've just added a test for this and it seems to now be executing in a fixed number of queries (8, to be precise). So I am suspecting that this is now fixed.
In fact, fixed to the extent that I suspect there is no longer a need for sql_util
.
Update: See #127
Closing this as it seems to be resolved, but definitely shout if it is still an issue
The TransactionAdmin can be very slow due to vast number of DB queries. I tried to fix this with partial success - I reduced number of queries from ~900 to ~400 in my test case by this admin override:
The code could be probably better directly implemented in
LegManager
to make use ofcredits()
anddebits()
, but anyway - I was not able to reduce number of queries to constant number and implement the prefetches in the manager.