Example:
I have a model with a many2one to 'res.partner'. I have a lot of records in that model, dozens of thousands of records, and a few thousands in res.partner. I also have the necessary indexes.
Why is this:
search([('customer_id.name', 'like', 'somename')])
way faster than this:
search([('customer_id', 'like', 'somename')])
?
Hi, thanks. I forgot to mention that I was using Odoo 8, but anyway the code is basically the same for that method.
I am not quite sure about why the double search is made. And I don't understand why the method is named "_search" and not "search".
But you gave me good hint.
Thank you.
The double search is to find the 10 people who work for Azure when you search for "Azure".