I have attached a screenshot of performance data when loading 1 form.
4 queries are executed 882 times - which is normal - but 1 query is taking 8ms each time.
I see there is date comparison and also an 0R clause, so I suppose one of these is slowing it down.
In code this happens :
- Code: Select all
/** @type JSFoundset<db:/globis_development/stock_salesreservation> */
var _fs_stock_salesreservation = databaseManager.getFoundSet("globis_development", "stock_salesreservation");
_fs_stock_salesreservation.clear()
_fs_stock_salesreservation.find()
_fs_stock_salesreservation.warehouse_id = _warehouse_id
_fs_stock_salesreservation.article_stock_id = _article_stock_id
_fs_stock_salesreservation.stock_salesreservation_status = _array_status
_fs_stock_salesreservation.expected_delivery_date = '<=' + globals.svy_utl_dateFind(_date, true)
_fs_stock_salesreservation.order_on_hold = 0
_fs_stock_salesreservation.contract_article_id = _contract_article_id ? _contract_article_id : '^'
_fs_stock_salesreservation.newRecord()
_fs_stock_salesreservation.warehouse_id = _warehouse_id
_fs_stock_salesreservation.article_stock_id = _article_stock_id
_fs_stock_salesreservation.stock_salesreservation_status = _array_status
_fs_stock_salesreservation.backorder_delivery_date = '<=' + globals.svy_utl_dateFind(_date, true)
_fs_stock_salesreservation.order_on_hold = 0
_fs_stock_salesreservation.contract_article_id = _contract_article_id ? _contract_article_id : '^'
_fs_stock_salesreservation.search()
What can I do to boost the performance?
I think there are indeces where they are supposed to be
Thanks