3b383f41f70cdf1d309e8a0330fd1ed3c1bd74c2
The filters for sponsor countries works by adding a domain term on `partner_id.country_id`. Currently this is evaluated by the ORM by first searching for all partners in those countries, and then substituting the IDs in the final query (`partner_id in <ids>`). On large databases with many partners, this makes the filtering really slow (e.g. 3 seconds with 1M partners), even though only a few sponsors actually match. From a security standpoint, most of the data on the linked partner is already available on the sponsor through related fields, and those partners are only visible when they are already published anyway. Besides, the calls in `_event_exhibitors_get_values` are performed in `sudo` mode. It should be noted that `res.partner.country_id` is not currently indexed, and doing so helps marginally: the query goes from 3000ms to 800ms. It is still much slower than with `auto_join`, which makes it go down to about 1-2 ms on the same dataset. Indexing `country_id` does not help make the `auto_join` version faster, as it only requires the primary key index to find the records. closes odoo/odoo#66692 X-original-commit: b5246315875dfad151fcb23936499750e0f1f42a Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%