Community: Framework mailing list archives
Re: report models based on sql views and search_read performance issueby
Thanks for your insights.I'm certainly not the first one to run into this, and I'm curious how people handle this.sorry....What happens is that search_read makes 2 SQL queries: first the search to find the ids first 80 rows of the table, this takes a couple of seconds, which is acceptable. Then the read makes a query with a where id in (list of ids) clause, which takes several minutes to run because the whole view needs to be processed as the domain from the search is no longer available.
In my current project, I have a report model class with _auto = False and which initializes an SQL view which is fairly complex. It worked fine with test data, but I'm hitting a performance limitation with my customers real data. After digging a bit, I found that the main issue is that the id column of the view is not indexed, and I have no easy way to map that column to an underlying indexed column which could help, because the view has a group by to perform some aggregations.2016-04-06 21:28 GMT+02:00 Alexandre Fayolle <firstname.lastname@example.org>:
Post to: mailto:email@example.com
Camptocamp France SAS, Alexandre Fayolle - Camptocamp