The new query should be twice as fast as the original, simply because it 
only scans the stock moves once.
On our production database after vacuumdb --analyze --full), EXPLAIN 
analyzes the original query at: cost=28787.10..28806.52 rows=1295 width=48.
The new query gets analyzed at: cost=13147.88..14458.26 rows=6471 width=37.
On a fresh demo 6.1 database, the original is analyzed at: 
cost=70.40..71.03 rows=42 width=48 ; vs the new one at: 
cost=34.36..34.94 rows=21 width=63
Lionel.

-- 
https://code.launchpad.net/~numerigraphe/openobject-addons/trunk-stock-simplify-report-sql/+merge/111058
Your team OpenERP Framework Experts is requested to review the proposed merge 
of lp:~numerigraphe/openobject-addons/trunk-stock-simplify-report-sql into 
lp:openobject-addons.

_______________________________________________
Mailing list: https://launchpad.net/~openerp-expert-framework
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-expert-framework
More help   : https://help.launchpad.net/ListHelp

Reply via email to