On 11/06/15 21:10, Cédric Krier wrote:
By the way, the default option in the new parameter 'target_search' for m2o
fields is 'subquery'. Maybe is it better to set 'join' by default? If not,
then the m2o relations suspected to have a lot of records like move lines,
invoice lines, sale lines, stock moves, ... should have the 'join' parameter
set in the tryton modules?
I will explain why I kept 'subquery' as default. On small database,
there will be almost no difference with the 'join'. On larger database,
in many cases the query planner could infer the 'join' if it worths it
base on its statistics. But the 'in' join could be worse on specific
case.

If on small database there is almost no difference between the two methods and on larger databases the 'in' joint is worse, I don't see the advantage to keep the 'subquery' method as the default one.

I make the question in another way: Which are the advantages of using 'subquery' method instead of 'join' method?


So for me, we must explicitly set the 'target_search' after some
thoughts just like the 'ondelete'. We will have to make an issue after
this one to search on each module the Many2One to fix.
Ok, but we must have a good criteria to choose one of the two methods in each case.

--
Jordi Esteve
Consultor Zikzakmedia SL
[email protected]
Mòbil 679 170 693

Zikzakmedia SL
St. Jaume, 9, baixos, 2a
08720 Vilafranca del Penedès
Tel 93 890 2108

Reply via email to